Importing PFX certificate in IIS

dirkdigs 921 Reputation points

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

Internet Information Services
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce Zhang-MSFT 3,736 Reputation points

    Hi @dirkdigs ,

    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

    0 comments No comments