未验证 提交 9282048c 编写于 作者: O Omair Majid 提交者: GitHub

Show the actual value of the X09VerifyStatusCode on error

Right now, the Debug.Fail just shows the literal text `Unrecognized
X509VerifyStatusCode:Interop+Crypto+X509VerifyStatusCode`, which isn't
very helpful.
上级 6fe49aad
......@@ -1174,7 +1174,7 @@ private static X509ChainStatusFlags MapOpenSsl30Code(Interop.Crypto.X509VerifySt
case Interop.Crypto.X509VerifyStatusCode30.X509_V_ERR_INVALID_CA:
return X509ChainStatusFlags.InvalidBasicConstraints;
default:
Debug.Fail("Unrecognized X509VerifyStatusCode:" + code);
Debug.Fail("Unrecognized X509VerifyStatusCode:" + code.Code30);
throw new CryptographicException();
}
}
......@@ -1186,7 +1186,7 @@ private static X509ChainStatusFlags MapOpenSsl102Code(Interop.Crypto.X509VerifyS
case Interop.Crypto.X509VerifyStatusCode102.X509_V_ERR_INVALID_CA:
return X509ChainStatusFlags.InvalidBasicConstraints;
default:
Debug.Fail("Unrecognized X509VerifyStatusCode:" + code);
Debug.Fail("Unrecognized X509VerifyStatusCode:" + code.Code102);
throw new CryptographicException();
}
}
......@@ -1198,7 +1198,7 @@ private static X509ChainStatusFlags MapOpenSsl111Code(Interop.Crypto.X509VerifyS
case Interop.Crypto.X509VerifyStatusCode111.X509_V_ERR_INVALID_CA:
return X509ChainStatusFlags.InvalidBasicConstraints;
default:
Debug.Fail("Unrecognized X509VerifyStatusCode:" + code);
Debug.Fail("Unrecognized X509VerifyStatusCode:" + code.Code111);
throw new CryptographicException();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册