I am trying to install an SSL Certificate in IIS on Windows Server. It only accepts the .pfx file format for importing & installing an SSL certificate for hosted applications.
(My machine is running on Windows 10 64-bit home edition & the target server is Windows IIS 10)
- I downloaded and installed OpenSSL for Windows from here
- I placed the .crt file & .key file into C:\Program Files\OpenSSL-Win64\bin.
- I entered into OpenSSL installed directory from command prompt.
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: set OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg
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:0909006CEM 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 & the filenames or file formats are being wrong (random file, conf file, crt file & key file etc). I also want to know the reason of this error. I have tried reaching out to GoDaddy technical team but they are not able to provide any solution even if the SSL certificate is purchased from GoDaddy.