I need .pfx file to install https on website on IIS.
I have two separate files: certificate (.cer or pem) and private key (.crt) but IIS accepts only .pfx files.
I obviously installed certificate and it is available in certificate manager (mmc) but when I select Certificate Export Wizard I cannot select PFX format (it's greyed out)
Are there any tools to do that or C# examples of doing that programtically?
I was having the same issue. My problem was that the computer that generated the initial certificate request had crashed before the extended ssl validation process was completed. I needed to generate a new private key and then import the updated certificate from the certificate provider. If the private key doesn't exist on your computer then you can't export the certificate as pfx. They option is greyed out.
I created .pfx file from .key and .pem files.
Like this
openssl pkcs12 -inkey rootCA.key -in rootCA.pem -export -out rootCA.pfx
I know a few users have talked about installing this and that and adding command lines programmes and downloading...
Personally I am lazy and find all these methods cumbersome and slow, plus I don't want to download anything and find the correct cmd lines if I don't have to.
Best way for me on my personal IIS server is to use RapidSSLOnline. This is a tool that's on a server allows you to upload your certificate and private key and is able to generate a pfx file for you that you can directly import into IIS.
The link is here: https://www.rapidsslonline.com/ssl-tools/ssl-converter.php
Below is the steps used for the scenario requested.
And that's it you should have a PFX downloaded and use this in your Import process on IIS.
Hope this helps other like minded, lazy tech people.
This is BY FAR the easiest way to convert *.cer to *.pfx files:
Just download the portable certificate converter from DigiCert: https://www.digicert.com/util/pfx-certificate-management-utility-import-export-instructions.htm
Execute it, select a file and get your *.pfx!!
When you say the certificate is available in MMC, is it available under "Current User" or "Local Computer"? I've found that I can only export the private key if it is under Local Computer.
You can add the snap in for Certificates to MMC and choose which account it should manage certificates for. Choose Local Computer. If your certificate is not there, import it by right clicking the store and choosing All Tasks > Import.
Now navigate to your imported certificate under the Local Computer version of the certificate snap in. Right click the certificate and choose All Tasks > Export. The second page of the export wizard should ask if you want to export the private key. Select Yes. The PFX option will now be the only one available (it is grayed out if you select no and the option to export the private key isn't available under the Current User account).
You'll be asked to set a password for the PFX file and then to set the certificate name.
I got a link with your requirement.Combine CRT and KEY Files into a PFX with OpenSSL
Extracts from the above link:
EDIT:
There is a support link with step by step information on how to do install the certificate.
After successfully install, export the certificate, choose
.pfx
format, include private key.Important Note: : To export the certificate in .pfx format you need to follow the steps on the same machine from which you have requested the certificate.
The imported file can be uploaded to server.