Turns out that I was trying to create a certificate from the .pfx instead of the .cer file.
Lesson learned…
- .cer files are an X.509 certificate in binary form. They are DER encoded.
- .pfx files are container files. Also DER encoded. They contain not only certificates, but also private keys in encrypted form.