C# .NET - Loading PEM File in C#

Asked By Robert Dare on 05-Aug-04 12:18 PM
Can anyone here guide me to a resorce that explains how to load a PrivateKey stored in a .pem format in .NET ?
There are many examples of loading the PrivateKey from the .NET XML format, or BASE64 decoded bytes, but nothing that relates to a .pem format.
Kind Regards,
Rob.

Here is a summary of the steps

Asked By Peter Bromberg on 05-Aug-04 02:14 PM
1. Convert the Linux private key file in PEM format to the PVK format using
the  PVKTool (you will need to search for that).
2. Import the certificate along with the converted private key in PVK format
using PVKImport tool from Microsoft. Although the PVKImport documentation
seems to suggest that it can only import SPC files, Iyou can import certificates in CER format, bypassing a CERT2SPC step.
3. Use CAPICOM to use the imported certificate along with the private key to
digitally sign the messages. (or you can use the .NET related classes).
This is not fun because of the number of steps involved, but that's the only solution I was able to find for you.