Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8245665: Test WeakAlg.java should only make sure no warning for weak …
…signature algorithms by keytool on root CA

Backport-of: ccd7d70
  • Loading branch information
GoeLin committed Sep 27, 2021
1 parent f0e7779 commit 1eb1ce8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/jdk/sun/security/tools/keytool/WeakAlg.java
Expand Up @@ -433,9 +433,9 @@ static void checkImport() throws Exception {
// The following 2 commands still have a warning on why not using
// the -cacerts option directly.
kt("-list -keystore " + KeyStoreUtil.getCacerts())
.shouldNotContain("risk");
.shouldNotMatch("signature algorithm.*risk");
kt("-list -v -keystore " + KeyStoreUtil.getCacerts())
.shouldNotContain("risk");
.shouldNotMatch("signature algorithm.*risk");

// -printcert will always show warnings
kt("-printcert -file ca.cert")
Expand All @@ -451,10 +451,10 @@ static void checkImport() throws Exception {
kt("-delete -alias d");
kt("-importcert -alias d -trustcacerts -file ca.cert", "no")
.shouldContain("Certificate already exists in system-wide CA")
.shouldNotContain("risk")
.shouldNotMatch("signature algorithm.*risk")
.shouldContain("Do you still want to add it to your own keystore?");
kt("-importcert -alias d -trustcacerts -file ca.cert -noprompt")
.shouldNotContain("risk")
.shouldNotMatch("signature algorithm.*risk")
.shouldNotContain("[no]");

// but not without -trustcacerts
Expand Down

1 comment on commit 1eb1ce8

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.