#StackBounty: #nginx #openssl Openssl: generated cer and key from pfx don't match

Bounty: 50

I’m trying to convert a pfx to cer and key format to use them with Nginx.

I’m using the following commands:

openssl pkcs12 -in input.pfx -out mycerts.cer -nokeys -clcerts


openssl pkcs12 -in input.pfx -out mycerts.key -nocerts -nodes

The problem is that the cer and key files don’t match!

openssl x509 -modulus -noout -in mycerts.crt | openssl md5


openssl rsa -modulus -noout -in mycerts.key | openssl md5

With other pix files the procedure works as expected.
How can I get a valid set of certificates for usage with nginx?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.