Skip to content

Commit

Permalink
more strings
Browse files Browse the repository at this point in the history
  • Loading branch information
wangweij committed Dec 13, 2024
1 parent ebff311 commit 53c9a7e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public class Resources extends java.util.ListResourceBundle {
{"Unable.to.parse.denyAfter.string.in.exception.message", "Unable to parse denyAfter date string in exception message"},
{"whose.sigalg.weak", "%1$s uses the %2$s signature algorithm which is considered a security risk."},
{"whose.key.disabled", "%1$s uses a %2$s which is considered a security risk and is disabled."},
{"whose.key.weak", "%1$s uses a %2$s which is considered a security risk. This key size will be disabled in a future update."},
{"whose.key.weak", "%1$s uses a %2$s which is considered a security risk. It will be disabled in a future update."},
{"jks.storetype.warning", "The %1$s keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using \"keytool -importkeystore -srckeystore %2$s -destkeystore %2$s -deststoretype pkcs12\"."},
{"migrate.keystore.warning", "Migrated \"%1$s\" to %4$s. The %2$s keystore is backed up as \"%3$s\"."},
{"backup.keystore.warning", "The original keystore \"%1$s\" is backed up as \"%3$s\"..."},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ private void displayMessagesAndResult(boolean isSigning) {

if ((legacyAlg & 8) == 8) {
warnings.add(String.format(
rb.getString("The.full.keyAlgName.signing.key.is.considered.a.security.risk..This.key.size.will.be.disabled.in.a.future.update."),
rb.getString("The.full.keyAlgName.signing.key.is.considered.a.security.risk..It.will.be.disabled.in.a.future.update."),
fullDisplayKeyName(privateKey)));
}

Expand Down Expand Up @@ -1280,7 +1280,7 @@ private void displayMessagesAndResult(boolean isSigning) {

if ((legacyAlg & 8) == 8) {
warnings.add(String.format(
rb.getString("The.full.keyAlgName.signing.key.is.considered.a.security.risk..This.key.size.will.be.disabled.in.a.future.update."),
rb.getString("The.full.keyAlgName.signing.key.is.considered.a.security.risk..It.will.be.disabled.in.a.future.update."),
fullDisplayKeyName(weakPublicKey)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ public class Resources extends java.util.ListResourceBundle {
"The %1$s signature algorithm is considered a security risk. This algorithm will be disabled in a future update."},
{"size.bit.alg",
"%1$d-bit %2$s"},
{"The.full.keyAlgName.signing.key.is.considered.a.security.risk..This.key.size.will.be.disabled.in.a.future.update.",
"The %s signing key is considered a security risk. This key size will be disabled in a future update."},
{"The.full.keyAlgName.signing.key.is.considered.a.security.risk..It.will.be.disabled.in.a.future.update.",
"The %s signing key is considered a security risk. It will be disabled in a future update."},
{"The.full.keyAlgName.signing.key.is.considered.a.security.risk.and.is.disabled.",
"The %s signing key is considered a security risk and is disabled."},
{"This.jar.contains.entries.whose.certificate.chain.is.invalid.reason.1",
Expand Down
4 changes: 2 additions & 2 deletions test/jdk/sun/security/tools/jarsigner/DisableCurveTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static void main(String[] args) throws Exception{
.shouldContain(">>> Signer")
.shouldContain("Signature algorithm: SHA384withECDSA, 256-bit EC (secp256r1) key (weak)")
.shouldContain("Warning:")
.shouldContain("The 256-bit EC (secp256r1) signing key is considered a security risk. This key size will be disabled in a future update")
.shouldContain("The 256-bit EC (secp256r1) signing key is considered a security risk. It will be disabled in a future update")
.shouldHaveExitValue(0);

SecurityTools.jarsigner("-verify signeda.jar " +
Expand All @@ -94,7 +94,7 @@ public static void main(String[] args) throws Exception{
.shouldContain("- Signed by")
.shouldContain("Signature algorithm: SHA384withECDSA, 256-bit EC (secp256r1) key (weak)")
.shouldContain("jar verified")
.shouldContain("The 256-bit EC (secp256r1) signing key is considered a security risk. This key size will be disabled in a future update")
.shouldContain("The 256-bit EC (secp256r1) signing key is considered a security risk. It will be disabled in a future update")
.shouldHaveExitValue(0);
}
}
2 changes: 1 addition & 1 deletion test/jdk/sun/security/tools/jarsigner/warnings/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public abstract class Test {
+ "This algorithm will be disabled in a future update.";

static final String WEAK_KEY_WARNING
= "This key size will be disabled in a future update.";
= "It will be disabled in a future update.";

static final String JAR_SIGNED = "jar signed.";

Expand Down

0 comments on commit 53c9a7e

Please sign in to comment.