提交 1ced6591 编写于 作者: S Stephen Toub

Merge pull request dotnet/corefx#9284 from stephentoub/fix_safehandle_null

Fix OpenSslCipher.OpenKey check for valid SafeHandle

Commit migrated from https://github.com/dotnet/corefx/commit/a8eb6cef2806b698bf098fa01ffaa3924f77c7de
......@@ -125,10 +125,7 @@ private void OpenKey(IntPtr algorithm, byte[] key)
IV,
_encrypting ? 1 : 0);
if (_ctx == null)
{
throw Interop.Crypto.CreateOpenSslCryptographicException();
}
Interop.Crypto.CheckValidOpenSslHandle(_ctx);
// OpenSSL will happily do PKCS#7 padding for us, but since we support padding modes
// that it doesn't (PaddingMode.Zeros) we'll just always pad the blocks ourselves.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册