certificates:conversions:convert_.pem_to_.pkcs12
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
certificates:conversions:convert_.pem_to_.pkcs12 [2020/04/15 17:23] – created peter | certificates:conversions:convert_.pem_to_.pkcs12 [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Certificates - Conversions - Convert .pem to .pkcs12 ====== | ====== Certificates - Conversions - Convert .pem to .pkcs12 ====== | ||
+ | |||
+ | To convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12): | ||
<code bash> | <code bash> | ||
openssl pkcs12 -export -out cert..pkcs12 -inkey privateKey.key -in cert.crt -certfile CACert.crt | openssl pkcs12 -export -out cert..pkcs12 -inkey privateKey.key -in cert.crt -certfile CACert.crt | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== With an intermediate certificate ===== | ||
+ | |||
+ | You need to concatenate all the PEM files into one, then convert it to PKCS#12: | ||
+ | |||
+ | <code bash> | ||
+ | cat certificate.crt intermediate.crt > bundle.crt | ||
+ | openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in bundle.crt | ||
+ | </ | ||
+ | |||
certificates/conversions/convert_.pem_to_.pkcs12.1586971389.txt.gz · Last modified: 2020/07/15 09:30 (external edit)