Commit da53cfc8 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Fail earlier if CryptExportPublicKeyInfo fails.

parent 6ccdbab6
......@@ -3202,8 +3202,10 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
}
}
CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL,
ret = CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL,
&pubKeySize);
if (!ret)
goto end;
pubKey = CryptMemAlloc(pubKeySize);
if (pubKey)
{
......@@ -3237,6 +3239,7 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
}
CryptMemFree(pubKey);
}
end:
if (releaseContext)
CryptReleaseContext(hProv, 0);
return context;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment