https://www.baeldung.com/java-import-cer-certificate-into-keystore
From this documentation keytool - Key and Certificate Management Tool, the Changes section at the end of the page says :
Renamed commands:
-import, renamed to -importcert
The keytool has many options but the one we're interested in is importcert which is as straightforward as its name. Since there are usually different entries inside a KeyStore, we'll have to use the alias argument to assign it a unique name:
> keytool -importcert -alias baeldung_public_cert -file baeldung.cer -keystore sample_keystore
> Enter keystore password:
...
> Trust this certificate? [no]: y
> Certificate was added to keystore
No comments:
Post a Comment