How to get .pfx file from .cer and .key?

前端 未结 2 1979
独厮守ぢ
独厮守ぢ 2021-01-15 04:29

Before questioning here. I\'ve searched a lot about my problem. And problem is still exists. Below is the references of posts, which I\'ve already read.

How to creat

相关标签:
2条回答
  • 2021-01-15 04:42

    The req command creates a certificate request by default, not a certificate. If you add the -x509 argument, it will self-sign the request using the provided key, and output a certificate instead. You should then be able to create the .pfx successfully.

    0 讨论(0)
  • 2021-01-15 04:43

    Although, the question is answered, I would like to add a simpler solution.

    There is no need to use any 3rd party tools (including OpenSSL) on Windows. You can use built-in certutil.exe tool. Place both files in the same folder and give the same name to files (e.g. server.cer and server.key) and run the following command:

    certutil -mergepfx path\server.cer
    

    Certutil will expect to find a key file in the same folder with .key file extension.

    0 讨论(0)
提交回复
热议问题