Skip to content


Browse files Browse the repository at this point in the history
8245665: Test 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/
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())
.shouldNotMatch("signature algorithm.*risk");
kt("-list -v -keystore " + KeyStoreUtil.getCacerts())
.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")
.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")
.shouldNotMatch("signature algorithm.*risk")

// but not without -trustcacerts
Expand Down

1 comment on commit 1eb1ce8

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.