We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f64ed09 commit c51d40cCopy full SHA for c51d40c
src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp
@@ -523,7 +523,11 @@ JNIEXPORT void JNICALL Java_sun_security_mscapi_CKeyStore_loadKeysOrCertificateC
523
else
524
{
525
if (bCallerFreeProv == TRUE) {
526
- ::CryptReleaseContext(hCryptProv, NULL); // deprecated
+ if ((dwKeySpec & CERT_NCRYPT_KEY_SPEC) == CERT_NCRYPT_KEY_SPEC) {
527
+ NCryptFreeObject(hCryptProv);
528
+ } else {
529
+ ::CryptReleaseContext(hCryptProv, NULL); // deprecated
530
+ }
531
bCallerFreeProv = FALSE;
532
}
533
0 commit comments