From a0b8244416e1fd061e0c0023a5094ef4a632000e Mon Sep 17 00:00:00 2001 From: Sean Coffey Date: Thu, 21 Nov 2019 11:31:58 +0000 Subject: [PATCH] 8233801: GCMEmptyIv.java test fails on Solaris 11.4 Reviewed-by: valeriep --- .../share/classes/sun/security/pkcs11/P11AEADCipher.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java index 7ab89ed1e46..bb29773630e 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java @@ -324,6 +324,9 @@ final class P11AEADCipher extends CipherSpi { try { initialize(); } catch (PKCS11Exception e) { + if (e.getErrorCode() == CKR_MECHANISM_PARAM_INVALID) { + throw new InvalidAlgorithmParameterException("Bad params", e); + } throw new InvalidKeyException("Could not initialize cipher", e); } }