This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
info:cryptography:openssl:convert_key [2014-12-18 15:37] andunix created |
info:cryptography:openssl:convert_key [2019-01-17 19:19] (current) andunix |
||
---|---|---|---|
Line 7: | Line 7: | ||
You can add '' | You can add '' | ||
If you don't, keytool will ask you for a password. | If you don't, keytool will ask you for a password. | ||
+ | |||
+ | ===== Convert PEM to P12 ===== | ||
+ | |||
+ | To convert '' | ||
+ | |||
+ | openssl pkcs12 -export -in cert.pem -inkey key.pem -out key.p12 | ||
+ | |||
+ | ===== Export Certificate from P12 ===== | ||
+ | |||
+ | Export the certificate with the complete certificate chain: | ||
+ | openssl pkcs12 -in testkey.p12 -out testkey.pem -nokeys | ||
+ | |||
+ | Export the certificate only: | ||
+ | openssl pkcs12 -in testkey.p12 -out testkey.pem -nokeys -clcerts | ||
{{tag> | {{tag> |