Forum Discussion
Converting .crt to .pfx
- Oct 05, 2022
Late answer but its
still notnow documented correctly i think (https://support.f5.com/csp/article/K31936122).
(edit LiefZimmerman to clarify the KB article was updated)The problem is that the certificate files are stored as DER format and have to be converted to PEM format first while the key files already are in PEM format:
copy files:
cp /config/filestore/files_d/Common_d/certificate_d/:foo_1: /var/tmp/foo.der cp /config/filestore/files_d/Common_d/certificate_key_d/:foo_2: /var/tmp/foo.key
check if DER:
openssl x509 -in /var/tmp/foo.der -inform DER -text
if DER, convert to pem:
openssl x509 -inform DER -outform PEM -text -in /var/tmp/foo.der -out /var/tmp/foo.crt
create pfx:
openssl pkcs12 -export -out /var/tmp/foo.pfx -inkey /var/tmp/foo.key -in /var/tmp/foo.crt
remove files after exported pfx to another machine:
rm /var/tmp/foo.der rm /var/tmp/foo.crt rm /var/tmp/foo.key rm /var/tmp/foo.pfx
greets
Irre
Late answer but its still not now documented correctly i think (https://support.f5.com/csp/article/K31936122).
(edit LiefZimmerman to clarify the KB article was updated)
The problem is that the certificate files are stored as DER format and have to be converted to PEM format first while the key files already are in PEM format:
copy files:
cp /config/filestore/files_d/Common_d/certificate_d/:foo_1: /var/tmp/foo.der
cp /config/filestore/files_d/Common_d/certificate_key_d/:foo_2: /var/tmp/foo.key
check if DER:
openssl x509 -in /var/tmp/foo.der -inform DER -text
if DER, convert to pem:
openssl x509 -inform DER -outform PEM -text -in /var/tmp/foo.der -out /var/tmp/foo.crt
create pfx:
openssl pkcs12 -export -out /var/tmp/foo.pfx -inkey /var/tmp/foo.key -in /var/tmp/foo.crt
remove files after exported pfx to another machine:
rm /var/tmp/foo.der
rm /var/tmp/foo.crt
rm /var/tmp/foo.key
rm /var/tmp/foo.pfx
greets
Irre
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com