changeset 5911:f0aa997ad78b

7199941: test about AES/ECB mode fails Summary: Fixed the problem of field "blockMode" not having correct value for AES algorithms. Reviewed-by: vinnie
author valeriep
date Tue, 25 Sep 2012 11:27:42 -0700
parents 3cfb621d5e7e
children 4fcbddfd97f0
files src/share/classes/sun/security/pkcs11/P11Cipher.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/pkcs11/P11Cipher.java	Fri Sep 21 15:39:10 2012 +0100
+++ b/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);