User Tools

Site Tools


info:cryptography:openssl:convert_key

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
info:cryptography:openssl:convert_key [2014-12-18 16:37]
andunix created
info:cryptography:openssl:convert_key [2019-01-17 20:19] (current)
andunix
Line 7: Line 7:
 You can add ''-deststorepass PASSWORD'' to set the password on the command line. You can add ''-deststorepass PASSWORD'' to set the password on the command line.
 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 ''cert.pem'' and ''key.pem'' to ''key.p12'':
 +
 +  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>openssl security cryptography key howto}} {{tag>openssl security cryptography key howto}}
info/cryptography/openssl/convert_key.1418917037.txt.gz · Last modified: 2014-12-18 16:37 by andunix