mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-21 12:20:29 +00:00
8381937: Make exceptions in Java_sun_security_mscapi_CKeyPairGenerator generateCKeyPair more specific
Reviewed-by: mdoerr, lucy
This commit is contained in:
parent
0acc1d1e4f
commit
78a6aa9c7a
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1375,7 +1375,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_mscapi_CKeyPairGenerator_00024RSA_ge
|
||||
PROV_RSA_FULL,
|
||||
CRYPT_NEWKEYSET) == FALSE)
|
||||
{
|
||||
ThrowException(env, KEY_EXCEPTION, GetLastError());
|
||||
ThrowExceptionWithMessageAndErrcode(env, KEY_EXCEPTION, "CryptAcquireContext failure", GetLastError());
|
||||
__leave;
|
||||
}
|
||||
}
|
||||
@ -1387,7 +1387,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_mscapi_CKeyPairGenerator_00024RSA_ge
|
||||
dwFlags,
|
||||
&hKeyPair) == FALSE)
|
||||
{
|
||||
ThrowException(env, KEY_EXCEPTION, GetLastError());
|
||||
ThrowExceptionWithMessageAndErrcode(env, KEY_EXCEPTION, "CryptGenKey failure", GetLastError());
|
||||
__leave;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user