8331391: Enhance the keytool code by invoking the buildTrustedCerts method for essential options

Reviewed-by: coffeys, mullan
This commit is contained in:
Prasadrao Koppula 2024-09-19 13:21:08 +00:00 committed by Sean Coffey
parent 7579d37402
commit c9bee173d6

@ -1132,7 +1132,6 @@ public final class Main {
}
}
KeyStore cakstore = buildTrustedCerts();
// -trustcacerts can be specified on -importcert, -printcert or -printcrl.
// Reset it so that warnings on CA cert will remain for other command.
if (command != IMPORTCERT && command != PRINTCERT
@ -1141,6 +1140,7 @@ public final class Main {
}
if (trustcacerts) {
KeyStore cakstore = buildTrustedCerts();
if (cakstore != null) {
caks = cakstore;
} else {