[issue21393] Python/random.c: close hCryptProv at exit

Tim Golden report at bugs.python.org
Mon May 5 18:51:20 CEST 2014


Tim Golden added the comment:

Unfortunately it looks as though this wasn't the correct way to close a Crypto handle. It isn't a conventional handle and we be using CryptReleaseContext to "close" it. cf http://msdn.microsoft.com/en-us/library/windows/desktop/aa382041%28v=vs.85%29.aspx for example.

At present it's giving a mismatched-pointer warning when building on Windows (because it's actually a pointer under the covers and not a simple numerical HANDLE).

Simple patch attached

----------
Added file: http://bugs.python.org/file35155/issue21393.cryptreleasecontext.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21393>
_______________________________________


More information about the Python-bugs-list mailing list