8182388: Backout 8182143

Reviewed-by: xuelei
This commit is contained in:
Artem Smotrakov 2017-06-16 17:06:35 -07:00
parent eb2f52dc0b
commit dd0b582f4b
2 changed files with 28 additions and 9 deletions

View File

@ -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 @@ final class SignatureAndHashAlgorithm {
"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,

View File

@ -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 @@ public class SignatureAlgorithms {
*/
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.
*/