how to get private key from PEM file?

后端 未结 6 748
迷失自我
迷失自我 2020-11-27 02:51

i have a .PEM file that includes public key and a private key for SSL data transfer like this:

-----BEGIN RSA PRIVATE KEY-----
      private key data
-----EN         


        
6条回答
  •  情深已故
    2020-11-27 03:23

    A different approach is to convert the client PEM certificate to the PFX format supported by Windows. This can be done using, for example, openssl, by running:

    openssl pkcs12 -export -out cert.pfx -inkey cert.key -in cert.pem -certfile ca.pem
    

    (where "cert.pfx" is the output file, "cert.key" contains the private key, "cert.pem" contains the input certificate, and "ca.pem" contains the certificate of the signer).

提交回复
热议问题