Key Tool commands 




Keystores and truststores are repositories that contain cryptographic artifacts like certificates and private keys that are used for cryptographic protocols such as TLS.


Keystore:



A keystore contains personal certificates, plus the corresponding private keys that are used to identify the owner of the certificate.

Truststore:


A truststore contains the signer certificates (also known as certificate authority certificates) which the endpoint trusts.


A signer certificate contains a public key, which is used to validate personal certificates. 
By installing the server’s signer certificate into the client's truststore, you are allowing the client to trust the server when it establishes a TLS connection. 
The same principle is true for a server to trust a client when TLS client authentication is enabled.




Generate Key store and self signed in one command :



keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048




Generate Key store


keytool -genkey -alias rameshbabuchallablogspot -keyalg RSA -keysize 2048 -keystore rameshbabuchallablogspot.jks


CSR :


keytool -certreq -alias bloggerflare -keyalg RSA -file rameshbabuchallablogspot.csr -keystore rameshbabuchallablogspot.jks


Importing CA Certs:


keytool -importcert -alias root -file root -keystore rameshbabuchallablogspot.jks

or 

keytool -import -trustcacerts -alias root -file Thawte.crt -keystore keystore.jks


keytool -importcert -alias intermediate -file intermediate -keystore rameshbabuchallablogspot.jks


keytool -importcert -file rameshbabuchallablogspot.cer -keystore rameshbabuchallablogspot.jks -alias rameshbabuchallablogspot



Comments

Popular posts from this blog

IBM WebSphere - Synchronize a node (syncNode)

Daily usage Linux Commands for Any Middleware Administration

Backup and Restore of WebSphere Application Server configuration