7199941: test about AES/ECB mode fails
authorvaleriep
Tue, 25 Sep 2012 11:27:42 -0700
changeset 14002 23126368d790
parent 14001 e8e8413ad49a
child 14003 53c498ff6b0b
7199941: test about AES/ECB mode fails Summary: Fixed the problem of field "blockMode" not having correct value for AES algorithms. Reviewed-by: vinnie
jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java
--- a/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java	Fri Sep 21 15:39:10 2012 +0100
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java	Tue Sep 25 11:27:42 2012 -0700
@@ -193,9 +193,9 @@
             } else { // DES, DESede, Blowfish
                 blockSize = 8;
             }
-            this.blockMode =
-                (algoParts.length > 1 ? parseMode(algoParts[1]) : MODE_ECB);
         }
+        this.blockMode =
+            (algoParts.length > 1 ? parseMode(algoParts[1]) : MODE_ECB);
         String defPadding = (blockSize == 0 ? "NoPadding" : "PKCS5Padding");
         String paddingStr =
                 (algoParts.length > 2 ? algoParts[2] : defPadding);