.pfx cert to DER encoded binary X.509

73 views Asked by At

I am attempting to export a .pfx certificate. But I am not able to export it along with the private keys. The option to export along with private key is greyed out with a note that stated the "associated private key is marked as not exportable".

screenshot of the greyed out part (https://i.stack.imgur.com/OVNXg.png)

I attempted to use Windows Cert Manager to import the .pfx and then from cert mngr I tried to export the Root, Intermediate, and Client certificates to DER encoded binary x.509 (.CER). I also tried various methods using OpenSSL to convert the .pfx to .der, .cer, or .p7b. Unfortunately, I have had no luck. All the openssl commands have converted .pfx cert to my desired format but when I upload it to webMethods tool I encountered various errors such as:

Certificate chain contains a single certificate, and that certificate is not self-signed: Even though I converted the whole chain to .cer/p7b and tried importing to sign/verify, encrypt/decrypt, and SSL. Java Null pointer. Cannot convert byte[][] to X509Certificate[], exception encountered at index 0. CertificateException encountered; Trading Networks cannot convert byte[] to java.security.cert.X509Certificat - Tried to import .cer that was exported from .pfx.

My end goal is to convert the .pfx file along with the private keys to .der/cer/.p7b. And then copy the individual Root, Intermediate and client certs.

0

There are 0 answers