changeset 57037:a096dfdcabde

8233801: GCMEmptyIv.java test fails on Solaris 11.4 Reviewed-by: valeriep
author coffeys
date Thu, 21 Nov 2019 11:31:58 +0000
parents 92c98aa0f801
children a686b67a59d9
files src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java	Thu Nov 21 11:42:54 2019 +0100
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java	Thu Nov 21 11:31:58 2019 +0000
@@ -324,6 +324,9 @@
         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);
         }
     }