Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8245151: jarsigner should not raise duplicate warnings on verification
Browse files Browse the repository at this point in the history
Reviewed-by: weijun
  • Loading branch information
Hai-May Chao committed May 19, 2020
1 parent 4159f68 commit a97932d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Expand Up @@ -1195,7 +1195,7 @@ private void displayMessagesAndResult(boolean isSigning) {

if ((legacyAlg & 4) != 0) {
warnings.add(String.format(
rb.getString("The.digest.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update."),
rb.getString("The.timestamp.digest.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update."),
legacyTsaDigestAlg));
}

Expand Down
Expand Up @@ -282,6 +282,8 @@ public class Resources extends java.util.ListResourceBundle {
"The %1$s algorithm specified for the %2$s option is considered a security risk. This algorithm will be disabled in a future update."},
{"The.1.algorithm.specified.for.the.2.option.is.considered.a.security.risk.and.is.disabled.",
"The %1$s algorithm specified for the %2$s option is considered a security risk and is disabled."},
{"The.timestamp.digest.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update.",
"The %1$s timestamp digest algorithm is considered a security risk. This algorithm will be disabled in a future update."},
{"The.digest.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update.",
"The %1$s digest algorithm is considered a security risk. This algorithm will be disabled in a future update."},
{"The.signature.algorithm.1.is.considered.a.security.risk..This.algorithm.will.be.disabled.in.a.future.update.",
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/sun/security/tools/jarsigner/TimestampCheck.java
Expand Up @@ -445,7 +445,7 @@ public static void main(String[] args) throws Throwable {
verify("sha1tsaalg.jar", "-strict")
.shouldHaveExitValue(0)
.shouldContain("jar verified, with signer errors")
.shouldContain("SHA-1 digest algorithm is considered a security risk")
.shouldContain("SHA-1 timestamp digest algorithm is considered a security risk")
.shouldNotContain("is disabled");

// Disabled algorithms
Expand Down

0 comments on commit a97932d

Please sign in to comment.