I am trying to install a Wildcard SSL Certificate in IIS on Windows Server. It only accepts the .pfx file format for importing & installing an SSL certificate for hosted applications. I got the .csr file from CA as it was a wildcard cert.
I downloaded and installed OpenSSL for Windows (Latest version).
I placed the .crt file & .key file into C:\Program Files\OpenSSL-Win64\bin.
Then I ran this command to generate a random file:
set RANDFILE=C:\Program Files\OpenSSL-Win64\bin\<RANDOMFILENAME>.rnd
Then I ran this command to give a path of config file:
Finally, I ran this command
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt
The result of this was:
unable to load private key 140406554043456:error:0909006C:PEM routines: get_name:no start line:../crypto/pem/pem_lib.c:745:Expecting: ANY PRIVATE KEY
I want to know if I'm making any mistake in the steps that I followed. I also want to know the reason of this error. I have the copy of private key & .crt file
Following are some more inputs which will make my question more specific.
I have the copy of generated-private-key.key file & .crt file. I changed the file names before executing the OpenSSL command. I even created the random file & config file.
The SSL certificate that I got from CA is a wildcard certificate, which I used to install on multiple subdomains of a customer. It was successful. Now while creating the .pfx file once again, I'm facing this problem.
A .pfx file should be created only on the server which was used to create .csr file. In our case, we got the .csr file from CA as it was a wildcard certificate.
(Thanks in advance. Any help is appreciated)