4

I want to generate certificate for my domain locally and then sign it, for example, by getaCert.com service. But I get an error at the end.

Below are steps:

  • Create config for OpenSSL openssl.cnf based on http://www.dylanbeattie.net/docs/openssl.conf

  • Create private key my.key and certificate request my.csr

    openssl req -new -nodes -keyout my.key -out my.csr -newkey rsa:2048 -config openssl.cnf

  • Submit my.csr to http://www.getacert.com/signacert.html and download signed public certificate my.cer and CA certificate getacert.cer

  • Try create PFX

    openssl pkcs12 -export -in my.cer -inkey my.key -out gd.p12 -certfile getacert.cer

Error occurs: No certificate matches private key

Why? And what am I doing wrong?

Here are similar question but without any reasonable answer

using OpenSSL to create .pfx file

Is it possible to convert an SSL certificate from a .key file to a .pfx?

4

0 回答 0