cheat/cheats/openssl

15 lines
451 B
Plaintext
Raw Permalink Normal View History

2024-10-07 13:51:06 +02:00
# show cert info
`openssl x509 -noout -text -in cert.pem`
# import pkcs12 into jks
`keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS`
# pkcs12/pfx to pem/crt + key
## export key
`openssl pkcs12 -in filename.pfx -nocerts -out key.pem`
## remove passphrase
`openssl rsa -in key.pem -out server.key`
## export cert
`openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem`