7199941: test about AES/ECB mode fails
Summary: Fixed the problem of field "blockMode" not having correct value for AES algorithms.
Reviewed-by: vinnie
--- 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);