8173708: Re-enable AES cipher with CFB128 mode for Ucrypto provider
Summary: Updated Ucrypto config file to remove the disabled mechanisms
Reviewed-by: wetmore
--- a/jdk/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg Wed Feb 08 16:33:52 2017 +0000
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg Wed Feb 08 19:20:09 2017 +0000
@@ -2,8 +2,5 @@
# Configuration file for the OracleUcrypto provider
#
disabledServices = {
- # disabled due to Solaris bug 7121679
- Cipher.AES/CFB128/PKCS5Padding
- Cipher.AES/CFB128/NoPadding
}
--- a/jdk/test/com/oracle/security/ucrypto/TestAES.java Wed Feb 08 16:33:52 2017 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestAES.java Wed Feb 08 19:20:09 2017 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 7088989 8014374 8167512
+ * @bug 7088989 8014374 8167512 8173708
* @summary Ensure the AES ciphers of OracleUcrypto provider works correctly
* @key randomness
* @run main TestAES
@@ -177,6 +177,12 @@
k += c.doFinal(eout, firstPartLen+1, eout.length - firstPartLen - 1, dout, k);
if (!checkArrays(in, in.length, dout, k)) testPassed = false;
} catch(Exception ex) {
+ if (ex instanceof BadPaddingException &&
+ algos[i].indexOf("CFB128") != -1 &&
+ p.getName().equals("OracleUcrypto")) {
+ System.out.println("Ignore due to a pre-S11.3 bug: " + ex);
+ continue;
+ }
System.out.println("Unexpected Exception: " + algos[i]);
ex.printStackTrace();
testPassed = false;