8214024: Remove the default keytool -keyalg value

Reviewed-by: mullan
This commit is contained in:
Weijun Wang 2019-11-15 09:06:58 +08:00
parent ddc8f8e757
commit c0d097eac6
24 changed files with 146 additions and 143 deletions

View file

@ -1151,17 +1151,15 @@ public final class Main {
}
} else if (command == GENKEYPAIR) {
if (keyAlgName == null) {
keyAlgName = "DSA";
weakWarnings.add(String.format(rb.getString(
"keyalg.option.1.missing.warning"), keyAlgName));
throw new Exception(rb.getString(
"keyalg.option.missing.error"));
}
doGenKeyPair(alias, dname, keyAlgName, keysize, groupName, sigAlgName);
kssave = true;
} else if (command == GENSECKEY) {
if (keyAlgName == null) {
keyAlgName = "DES";
weakWarnings.add(String.format(rb.getString(
"keyalg.option.1.missing.warning"), keyAlgName));
throw new Exception(rb.getString(
"keyalg.option.missing.error"));
}
doGenSecretKey(alias, keyAlgName, keysize);
kssave = true;

View file

@ -474,7 +474,7 @@ public class Resources extends java.util.ListResourceBundle {
{"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\"..."},
{"importing.keystore.status", "Importing keystore %1$s to %2$s..."},
{"keyalg.option.1.missing.warning", "No -keyalg option. The default key algorithm (%s) is a legacy algorithm and is no longer recommended. In a subsequent release of the JDK, the default will be removed and the -keyalg option must be specified."},
{"keyalg.option.missing.error", "The -keyalg option must be specified."},
{"showinfo.no.option", "Missing option for -showinfo. Try \"keytool -showinfo -tls\"."},
};