keytool is a key and certificate management utility. It allows users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures.
How do I use Keytool?
- Generate the server certificate. Type the keytool command all on one line: …
- Export the generated server certificate in keystore. jks into the file server. …
- To add the server certificate to the truststore file, cacerts. …
- Type yes , then press the Enter or Return key.
What is Java keystore used for?
A Java Keystore is a container for authorization certificates or public key certificates, and is often used by Java-based applications for encryption, authentication, and serving over HTTPS. Its entries are protected by a keystore password.