I have one . The PEM file I want to convert to a PKCS12 (PFX) file, and I know that I can easily do this using the following command openssl:
Create a PKCS
openssl pkcs12 -export -in file.pem -out file.p12 -name "My Certificate"
This is great, but I would like to do it programmatically using OpenSSL . Unfortunately, the documentation for OpenSSL is less than ideal.
I studied this using other libraries:
Using .NET: I can create an X509Certificate2 object from a PEM file, but it only grabs the first certificate and ignores any intermediate CA in the PEM file.
Using Mentalis.org Security Library: I can create a certificate object from a PEM file, but I see the following in the documentation:
PEM. , .
, . .
OpenSSL PEM > PFX, .
?