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
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.
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.