question

JasonGodfrey-5248 avatar image
0 Votes"
JasonGodfrey-5248 asked BruceZhang-MSFT answered

Importing PFX certificate in IIS

Hello from Godaddy we receive the following files

.pem & .crt

I am trying to bind this cert to a site in IIS.

When I attempt to import into IIS (server Certificates) it's asking for .PFX.

Can you do this using openssl?

I tried the following but got error.

C:\Program Files\OpenSSL-Win64\bin>openssl pkcs12 -inkey C:\1234.pem -in C:\1234.crt -export -out C:\Users\1234.pfx

unable to load private key

1188:error:0909006C:PEM routines:get_name:no start line:crypto\pem\pem_lib.c:745:Expecting: ANY PRIVATE KEY

windows-server-iis
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

BruceZhang-MSFT avatar image
0 Votes"
BruceZhang-MSFT answered

Hi @JasonGodfrey-5248 ,

Please check the pem file to make sure its structure is correct. The error means is that the PEM file is missing the indicator that the key portion has begun.

PEM files are structured like this:

 -----BEGIN CERTIFICATE-----
 .....
 -----END CERTIFICATE-----

Begin and End statements are necessary and 5 dash also necessary. Don't miss anyone.




If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.


Best regards,
Bruce Zhang

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.