Extract private key from pfx file or certificate store WITHOUT using OpenSSL on Windows

后端 未结 5 2365
孤街浪徒
孤街浪徒 2021-02-19 08:42

As the title suggests I would like to export my private key without using OpenSSL or any other third party tool. If I need a .cer file or .pfx file I c

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-19 09:19

    The Key, when exportable, can be exported using several APIs to several formats. The most common would be PKCS#8 (industry standard) and XML (MSFT properitary afaik).

    Have a look at these answers:

    • Export CngKey in PKCS8 with encryption c#
    • C# (.NET) RSACryptoServiceProvider import/export x509 public key blob and PKCS8 private key blob
    • Convert RSACryptoServiceProvider RSA XML key to PKCS8
    • RSACng and CngKeyBlobFormat import and export formats

提交回复
热议问题