Handy Certificate Commands for Linux
How to view certificates in Java Key Store (JKS) keytool -list -v -keystore <keystorename>.jks How to add certificate in key store (it will install the cert chain of trust also) keytool -importkeystore -srckeystore /tmp/<pfxname>.pfx -srcstoretype pkcs 2 -destkeystore <keystorename>..jks -deststoretype JKS keytool –import –keystore <keystorename> -file <certname>.cer In the above, the pfx should contain the certs til the root level. After entering the command you need to provide destination password as key store password and source password as pfx password. Note: the pfx password and keystore password has to be same. How to delete certificate in key store. keytool -delete -alias <aliasnameofcert> -keystore <keystorename>.jks Change alias of the existing certificate: keytool -changealias -alias <aliasname> -destalias <newalias> -keystore <keystorename>.jks Always t