SSL certificate format conversions
SSL certificate format conversion shouldn't be very complicated task. All you need is openssl installed on your machine and find appropriate command
- Install OpenSSL
Sources are - > http://openssl.org/source
Install guide -> is being created - Conversion commands
- CER to PEM
openssl x509 -in <path_to_your_CER_certificate>.cer -inform DER -out <path_to_your_PEM_certificate> -outform PEM - PEM to PKCS12
openssl pkcs12 -export -in <path_to_your_PEM_certificate> -out <path_to_your_PKCS12_certificate>.p12 - PEM to DER - dsa keys
openssl dsa -inform PEM -outform DER -in <path_to_your_PEM_certificate> -out <path_to_your_DER_certificate> - PEM to DER - rsa keys
openssl rsa -inform PEM -outform DER -in <path_to_your_PEM_certificate> -out <path_to_your_DER_certificate>
- CER to PEM
If I missed out any conversion you are looking for drop me a line.
how to import wildcard iis ssl certificate to ibm ihs
today I have spent some time trying to import wildcard ssl certificate which was issued for IIS into IBM IHS. Not that easy as I thought it would be. Here is what I have done to achieve it.
First you have to export SSL certificate from IIS
- Login to windows server
- Click Start -> Run
- Run MMC
- Click on File -> Add/Remove Snap-in
- Click on Add -> Certificates
- Select Computer Account
- Click Next
- Select Local Computer
- Click Finish
- Click OK to close active window
- Expand Certificates
- Expand Personal
- Select Certificates
- Use right click on certificate you'd like to export
- Follow all the steps in Certificate Export Wizard
- Make sure you selected Yes, export private key
- Select Include all certificates in certificate path...
- Make sure you remember choosen password
- Select location pfx file should be saved into
- Click Finish
Once you have pfx file exported transfer it to some temporary location on the server your IHS is installed and follow steps below to convert pfx certificate to cer
- Login to your server
- Make sure you have openssl installed
- Execute following command
openssl pkcs12 -in /your/temp/location/certificate.pfx -out /your/temp/location/certificate.cer -nodes - Check if cer file was saved
Now ssl certificate you exported from IIS is ready to be imported. To import certificate see steps below.
- Navigate to <ihs_root>/bin
- Export display to any machine can handle x-session
export DISPLAY=127.120.12.12:0.0 - Launch ikeyman
./ikeyman - Create new keystore database
- Provide password you will remember
- Make sure stash password option is selected
- Select Personal Certificates from dropdown menu
- Click on Import
- Click on Browse and navigate to location your certificate is located
- Select the file and click OK
- Type in password you selected while exporting your certificate from IIS
- Click OK
- Certificate should appear imediately in the Personal Certificates section
If there were no errors you are done. The most common error says "Key databased has been corrupted". In this case you have to follow additional steps in order to be able to import it.
- Identify JRE version of your IHS by issuing following command
/<ihs_root>/java/jre/bin/java -fullversion - Based on the above command output download respective files
- Version 1.4.1 and lower
ibm site - Version 1.4.2 and higher
unrestricted_policy.zip or ibm site
- Version 1.4.1 and lower
- Back up following files local_policy.jar and US_export_policy.jar
cp /<ihs_root>/java/jre/lib/security/local_policy.jar local_policy.jar.orig
cp /<ihs_root>/java/jre/lib/security/US_export_policy.jar - Extract downloaded zip container and move both files to destination folder
unzip unrestricted.zip
mv *policy.jar /<ihs_root>/java/jre/lib/security/ - Restart ikeyman tool
/<ihs_root>/bin/ikeyman - Open previously created key store
- Type in password
- Select Personal Certificates from dropdown menu
- Click on Import
- Click on Browse and navigate to location your certificate is located
- Select the file and click OK
- Type in password you selected while exporting your certificate from IIS
- Click OK
- Certificate should appear imediately in the Personal Certificates section
Done