--- a/jdk/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java Fri Jun 16 08:00:53 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java Fri Jun 16 17:06:35 2017 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, 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
@@ -411,12 +411,16 @@
"SHA1withRSA", --p);
supports(HashAlgorithm.SHA1, SignatureAlgorithm.ECDSA,
"SHA1withECDSA", --p);
- supports(HashAlgorithm.SHA224, SignatureAlgorithm.DSA,
- "SHA224withDSA", --p);
- supports(HashAlgorithm.SHA224, SignatureAlgorithm.RSA,
- "SHA224withRSA", --p);
- supports(HashAlgorithm.SHA224, SignatureAlgorithm.ECDSA,
- "SHA224withECDSA", --p);
+
+ if (Security.getProvider("SunMSCAPI") == null) {
+ supports(HashAlgorithm.SHA224, SignatureAlgorithm.DSA,
+ "SHA224withDSA", --p);
+ supports(HashAlgorithm.SHA224, SignatureAlgorithm.RSA,
+ "SHA224withRSA", --p);
+ supports(HashAlgorithm.SHA224, SignatureAlgorithm.ECDSA,
+ "SHA224withECDSA", --p);
+ }
+
supports(HashAlgorithm.SHA256, SignatureAlgorithm.DSA,
"SHA256withDSA", --p);
supports(HashAlgorithm.SHA256, SignatureAlgorithm.RSA,
--- a/jdk/test/javax/net/ssl/TLSv12/SignatureAlgorithms.java Fri Jun 16 08:00:53 2017 -0700
+++ b/jdk/test/javax/net/ssl/TLSv12/SignatureAlgorithms.java Fri Jun 16 17:06:35 2017 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -30,7 +30,7 @@
/*
* @test
- * @bug 8049321 8182143
+ * @bug 8049321
* @summary Support SHA256WithDSA in JSSE
* @run main/othervm SignatureAlgorithms PKIX "SHA-224,SHA-256"
* TLS_DHE_DSS_WITH_AES_128_CBC_SHA
@@ -434,6 +434,21 @@
*/
parseArguments(args);
+
+ /*
+ * Ignore testing on Windows if only SHA-224 is available.
+ */
+ if ((Security.getProvider("SunMSCAPI") != null) &&
+ (disabledAlgorithms.contains("SHA-1")) &&
+ (disabledAlgorithms.contains("SHA-256"))) {
+
+ System.out.println(
+ "Windows system does not support SHA-224 algorithms yet. " +
+ "Ignore the testing");
+
+ return;
+ }
+
/*
* Expose the target algorithms by diabling unexpected algorithms.
*/