Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL certificate is not installing

Tags:

iis

https

ssl

I'm facing an issue in installing SSL certificate in IIS and below are the step before I got the certificate from my CA.

  1. Generated a private key file using OpenSSL with: "openssl genrsa -out key_name.key 2048" command.

  2. Generated .csr file with: "openssl req -out CSR.csr -key key_name.key -new -sha256" command.

  3. Once I generated the CSR file, I provided the same CSR file to CA to get me certificate.

  4. I got the certificate in .p7b format, which I converted to .cer format.

  5. Installed certificate using "Complete certificate request" option in IIS.

Now the problem is that newly installed certificate vanishes from IIS after a refresh. I Googled this issue and understood that, it's happening so because there is no private key associated with certificate. My question is where the private key has gone?? I had created the CSR using the private key in step 1. Secondly, how do I over come this issue, I have to install the certificate anyhow. Please help.

like image 822
Aniruddha Avatar asked Oct 19 '22 10:10

Aniruddha


1 Answers

You did not generate the certificate request via IIS Manager. Thus, you should not use IIS to complete the request.

Instead, you need to use OpenSSL to generate a PFX file,

create a pfx file from a .cer and a .pem file

Then you can import it to IIS.

You might read this post for more details,

https://blog.lextudio.com/2015/06/the-whole-story-of-server-certificate-disappears-in-iis-77-588-510-0-after-installing-it-why/

like image 155
Lex Li Avatar answered Oct 21 '22 22:10

Lex Li