opensslpkcs#8

Converting a private key to PKCS#8


I've generated a key using OpenSSL:

openssl genrsa -out my.key 2048

How to convert this key to PKCS#8 so that I can import it easily in .NET using CngKey.Import?


Solution

  • Found a solution:

    openssl pkcs8 -topk8 -in my.key -out my.pkcs8.key -nocrypt