Skip to content

Commit 12c27e2

Browse files
Fix names of algorithms printed in debug trace
The parameter used to indicate the name of the algorithm, whose native implementation's availability is being checked, was incorrectly set to the provider name, leading to incorrect debug trace messages. Signed-off-by: Kostas Tsiounis <[email protected]>
1 parent baecafe commit 12c27e2

File tree

1 file changed

+5
-5
lines changed
  • src/java.base/share/classes/sun/security/ec

1 file changed

+5
-5
lines changed

src/java.base/share/classes/sun/security/ec/SunEC.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,30 @@ public final class SunEC extends Provider {
6565
/* The property 'jdk.nativeEC' is used to control enablement of the native
6666
* ECDH implementation.
6767
*/
68-
private static final boolean useNativeECDH = NativeCrypto.isAlgorithmEnabled("jdk.nativeEC", "SunEC");
68+
private static final boolean useNativeECDH = NativeCrypto.isAlgorithmEnabled("jdk.nativeEC", "ECDH");
6969

7070
/* The property 'jdk.nativeECKeyGen' is used to control enablement of the native
7171
* ECKeyGeneration implementation.
7272
* OpenSSL 1.1.0 or above is required for EC key generation support.
7373
*/
74-
private static final boolean useNativeECKeyGen = NativeCrypto.isAlgorithmEnabled("jdk.nativeECKeyGen", "SunEC");
74+
private static final boolean useNativeECKeyGen = NativeCrypto.isAlgorithmEnabled("jdk.nativeECKeyGen", "ECKeyGen");
7575

7676
/* The property 'jdk.nativeECDSA' is used to control enablement of the native
7777
* ECDSA signature implementation.
7878
*/
79-
private static final boolean useNativeECDSA = NativeCrypto.isAlgorithmEnabled("jdk.nativeECDSA", "SunEC");
79+
private static final boolean useNativeECDSA = NativeCrypto.isAlgorithmEnabled("jdk.nativeECDSA", "ECDSA");
8080

8181
/* The property 'jdk.nativeXDHKeyAgreement' is used to control enablement of the native
8282
* XDH key agreement. XDH key agreement is only supported in OpenSSL 1.1.1 and above.
8383
*/
8484
private static final boolean useNativeXDHKeyAgreement =
85-
NativeCrypto.isAlgorithmEnabled("jdk.nativeXDHKeyAgreement", "SunEC");
85+
NativeCrypto.isAlgorithmEnabled("jdk.nativeXDHKeyAgreement", "XDHKeyAgreement");
8686

8787
/* The property 'jdk.nativeXDHKeyGen' is used to control enablement of the native
8888
* XDH key generation. XDH key generation is only supported in OpenSSL 1.1.1 and above.
8989
*/
9090
private static final boolean useNativeXDHKeyGen =
91-
NativeCrypto.isAlgorithmEnabled("jdk.nativeXDHKeyGen", "SunEC");
91+
NativeCrypto.isAlgorithmEnabled("jdk.nativeXDHKeyGen", "XDHKeyGen");
9292

9393
private static class ProviderServiceA extends ProviderService {
9494
ProviderServiceA(Provider p, String type, String algo, String cn,

0 commit comments

Comments
 (0)