PKCS12 certificate is stored in binary format while PEM certificate is an ASCII file which can be opened and viewed in a text editor.
Q1. How can I convert a PEM ceritificate of the form below to a PKCS12 certificate programmatically?
-----BEGIN CERTIFICATE-----
*****CERTIFICATE DATA*****
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
*****PRIVATE KEY DATA********
-----END RSA PRIVATE KEY-----
Q2. Now I have read a PKCS12 file and I want to convert the PKCS12 data into a PEM format, again using a .NET program?
Do I need to use any of the encoding schemes supported in .NET?
Note: I am using CryptoAPI library