Exporting SSL certificate from Juniper SA 2000 to IIS 7 - iis

Has anyone exported SSL certificate (cert and private key) from a Juniper SA 2000 box and tried to import it to IIS 7 box ?
I have tried to google for ways to export the private key from SA 2000 but haven't got any good links. (IIS 7 requires the cert and key put into a .pfx format to import). But if i can export the private key and also have the cert i can create the pfx using openssl.
Any help regarding this is appreciated.
Thanks.

If you can't export the certificate with the private. I would suggest to contact your CA provider to reissue your certificate using the new CSR generated from your IIS 7 server. Reissuing of certificate in free of charge if you are a GlobalSign customer or your certificate is issued by GlobalSign.
Reissuing your certificate using the CSR generated from the IIS 7 server will allow you to install the certificate using the PEM certificate format (.crt file)
You may refer to this link: https://support.globalsign.com/customer/portal/articles/1226960-install-certificate---internet-information-services-iis-7

Related

Need to convert CRT files from Sectigo (Comodo) to pfx for azure

I bought a Sectigo's SSL Certificate from an intermediate vendor. I requested to vendor the certificate and Sectigo send me the four crt certificates (root, intermediates, ssl). I want to convert to pfx for azure but I dont have either private key and scr data. Can I convert the certificates or I need to request the private and/or crt data to the intermediate vendor
I request to my intermediate vendor the private key and I can generate pfx file!!!
In the IIS you create a certificate request. As soon as you receive the CRT run the following commands in cmd
type DomainNAme.crt AAACertificateServices.crt USERTrustRSAAAACA.crt SectigoRSADomainValidationSecureServerCA.crt>Domain.cer
Go to complete certificate request and import the domain.cer . Then from IIS you can export the pfx.

IIS: SSL certificate request and private key exportable

I'm writing to ask for this question: when a new wildcard SSL certificate request is made from IIS (wizard), does the "private key exportable" option enabled ? Because once installed, I need to export the new certificate together with private key.
Thank you,
Luca
If you need to export the key (to install the same cert in other server for example) you need to mark private Key as exportable. Otherwise that certificate wont work in any other machine (as the key will be different) I do not think its a best practise tho.
I found a more secure way:
Generate the CSR and private key file by using openssl
Submit the CSR to public CA
Convert the certificate issued by public CA from CRT to PFX (containing the private key - not marked as exportable)
Bye,
Luca

Custom domains/SSL binding in Microsoft Azure server

I have installed SSL successful in my azure server but it's not binding with domain. I am getting following error message.
It is not clear on what certificate you are using. To use a certificate in App Service, the certificate must meet all the following requirements:
Signed by a trusted certificate authority
Exported as a password-protected PFX file
Contains private key at least 2048 bits long
Contains all intermediate certificates in the certificate chain
As highlighted by Snobu you may regenerate the certificate (for Self-Signed) with: extendedKeyUsage = critical,codeSigning,1.3.6.1.5.5.7.3.1 in the x509_extensions in the file. Refer this document for the step-step instructions on uploading a certificate.

Trust a self signed cert from IIS

I have an externally hosted iis webserver where i run my website. I would like to add a self signed certificate to this website and trust it on my local client, to remove "Insecure Connection" from the browser.
What i have done so far is the following
Created a self signed certificate in IIS: Server Certificates -> Create self signed Certificate. The cert is issued to the servername e.g "ABCD01"
Created a website with a https binding using the self signed certificate.
Exported the self signed certificate from IIS using: Server Certificates -> Export. This resulted in an .pfx file
Imported the .pfx cert file on the local client: manage computer certificates -> Trusted Root certification authorities -> import
Added the hostname (ABCD01) and ip of the host to the hosts file: C:\Windows\System32\drivers\etc\hosts
When i try to open the website in firefox (using https://ABCD01), i still get the "Your connection is not secure". What am i missing?
There are multiple issues:
IIS certificate generator creates self-signed certificates with SHA1 signature algorithm which is obsolete in modern browsers. You have to use different tools to create test certificates. For example, use PowerShell New-SelfSignedCertificate cmdlet where you can specify signature algorithm. Look at this post to get an example: https://stackoverflow.com/a/45284368/3997611
New-SelfSignedCertificate `
-DnsName "ABCD01" `
-CertStoreLocation "cert:\LocalMachine\My" `
-FriendlyName "test dev cert" `
-TextExtension "2.5.29.37={text}1.3.6.1.5.5.7.3.1" `
-KeyUsage DigitalSignature,KeyEncipherment,DataEncipherment `
-Provider "Microsoft RSA SChannel Cryptographic Provider" `
-HashAlgorithm "SHA256"
IIS certificate generator cannot build certificate with SAN (Subject Alternative Names) certificate extension which is required in Google Chrome. You have to use different tools to create test certificates. Look at the example above for reference.
Google Chrome uses built-in Windows Certificate store to establish a trust, while FireFox uses its own certificate store. Therefore, after adding the certificate to Windows certificate store, you have to import your test certificate to FireFox manually.

How to convert from a separate .crt/.p7b file to a .pfx file

I have a problem on installation SSL certificate in IIS 7.
I downloaded the ssl certificate from godaddy. I got zip file and I saw two certificate files with .crt and .p7b in zip file.
I tried to install SSL certificate using Complete Certificate Request in IIS. After I installed it, I refreshed the server. When I checked the certificate I installed, it is disappeared in certificate list.
I followed the instructions from godaddy support link.
I tried many ways to install the certificates but after refreshed, it is gone.
I found a way that it needs to import certificate using import under action in IIS, but it needs .pfx file.
I would like to know how do I change from two certificates (.crt and .p7b) to .pfx file.
Actually, I am not familiar with SSL. So, I appreciate your help. Thanks.
You may not be able to convert/export .crt/p7b file to pfx as it doesnt contain private key.
Create a new CSR using DigiCert Utility (http://www.digicert.com). Have your CA issue out the domain cert again with the new CSR.
Then import the crt file in the utility. To enable the option of exporting out a PFX file (which includes both the domain cert and the private key).
openssl pkcs12 -export -out example.com.pfx -inkey example.com.key -in example.com.crt -certfile Example-CA-BUNDLE.crt
A PEM encoded cert and private key can be combined into PKCS12 easily with OpenSSL on the command line.

Resources