Integrated: 8303607: SunMSCAPI provider leaks memory and keys

Mat Carter macarte at
Tue Mar 7 02:15:24 UTC 2023

On Mon, 6 Mar 2023 21:27:07 GMT, Mat Carter <macarte at> wrote:

> Use the correct API for freeing key handles when directed to by the output of CryptAcquireCertificatePrivateKey [1].
> Specifically when [out] pfCallerFreeProvOrNCryptKey is true we test [out] pdwKeySpec for the CERT_NCRYPT_KEY_SPEC flag.  When flag bit is set we now call NCryptFreeObject, otherwise we continue to call CryptReleaseContext (as before)
> [1]

This pull request has now been integrated.

Changeset: c51d40cf
Author:    Mat Carter <macarte at>
Committer: Weijun Wang <weijun at>
Stats:     5 lines in 1 file changed: 4 ins; 0 del; 1 mod

8303607: SunMSCAPI provider leaks memory and keys

Reviewed-by: weijun



More information about the security-dev mailing list