changeset 16658:cb761a779278

8173708: Re-enable AES cipher with CFB128 mode for Ucrypto provider Summary: Updated Ucrypto config file to remove the disabled mechanisms Reviewed-by: wetmore
author valeriep
date Wed, 08 Feb 2017 19:20:09 +0000
parents e56bfa6ae3ce
children d4816c8d3ab8
files src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg test/com/oracle/security/ucrypto/TestAES.java
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.crypto.ucrypto/solaris/conf/security/ucrypto-solaris.cfg	Wed Feb 08 16:33:52 2017 +0000
+++ b/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/test/com/oracle/security/ucrypto/TestAES.java	Wed Feb 08 16:33:52 2017 +0000
+++ b/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;