certificate info
openssl x509 -in <file.pem> -text -noout
certificate subject
openssl x509 -subject -nameopt RFC2253 -noout -in <file.pem>
get information
openssl pkcs12 -info -in <keystore.p12>
import private key and certificate
openssl pkcs12 -export \
-in <cert.pem> \
-inkey <private.key> \
-out <keystore.p12>
import cerfiticate
openssl pkcs12 -export \
-in <cert.pem> \
-nokeys \
-out <keystore.p12>
get information
keytool -list -keystore <keystore.jks>
keytool -list -keystore <keystore.p12> -storetype pkcs12
can't import a private key
import cerfiticate
keytool -keystore <keystore.jks> -import -file <cert.pem>
convert a pkcs12 to jks
keytool -importkeystore -noprompt \
-destkeystore <keystore.jks> \
-deststorepass <pass> \
-srckeystore <keystore.p12> -srcstoretype PKCS12 \
-srcstorepass <pass>