Skip to main content

How do I use a certificate from IIS or Apache on Tomcat?

Summary

These steps will show you how to use a keypair (private key and Entrust SSL cert) generated by OpenSSL to be transferred to a Tomcat server application in a JKS or PFX keystore format.


User-added image

Applicable to: OpenSSL, Apache and Tomcat version 4.x or higher

OpenSSL Steps:

You will need to convert your private key and Entrust SSL certificate into a pkcs12 formatted file.

openssl pkcs12 -inkey private.key -in EntrustSSLserver.crt -export -out pkcs12keypair.p12
Enter PEM pass phrase:******
Enter Export Password:******
Verifying password - Enter Export Password:******

Tomcat Steps:

Once you have your pkcs12 file, you can use this with tomcat.

The recommended Sun Java is 1.4.2

In Tomcat specify the type of keystore in the server.xml file.

Depending on your tomcat version the below entry may vary. In your SSL connector type

Parameter name="keystoreType" Value="pkcs12"
Parameter Name="keystore" Value="C:/keystore/newstore.pfx"
Parameter Name="keypass" Value="changeit"

If you are using SOAP or other application to use this pkcs12 keystore, make sure you add/modify the below into your application

-Djavax.net.ssl.keyStore=__pfx_path_and_filename__.pfx

-Djavax.net.ssl.keyStoreType=pkcs12

-Djavax.net.ssl.keyStorePassword=__password__

As an alternative, if you wish to use a JKS keystore type and not a pkcs12 keystore type, you will need to create a new empty keystore file, then import the pkcs12 keypair. You can then give the keystore name an extension of .jks and configure your tomcat xml file to use it. By default tomcat will recognize .jks keystore type. You can do this from using the keytool command that comes with Sun Java - recommended version is Sun Java 1.4.2 which already contains the Entrust.net Secure Server Root CA.

If you have any questions or concerns please contact the Entrust Certificate Services Support department for further assistance:

Hours of Operation:
Sunday 8:00 PM ET to Friday 8:00 PM ET
North America (toll free): 1-866-267-9297
Outside North America: 1-613-270-2680 (or see the list below)
NOTE: Smart Phone users may use the 1-800 numbers shown in the table below.
Otherwise, it is very important that international callers dial the UITF format exactly as indicated. Do not dial an extra "1" before the "800" or your call will not be accepted as an UITF toll free call.

Country Number
Australia 0011 - 800-3687-7863
1-800-767-513
Austria 00 - 800-3687-7863
Belgium 00 - 800-3687-7863
Denmark 00 - 800-3687-7863
Finland 990 - 800-3687-7863 (Telecom Finland)
00 - 800-3687-7863 (Finnet)
France 00 - 800-3687-7863
Germany 00 - 800-3687-7863
Hong Kong 001 - 800-3687-7863 (Voice)
002 - 800-3687-7863 (Fax)
Ireland 00 - 800-3687-7863
Israel 014 - 800-3687-7863
Italy 00 - 800-3687-7863
Japan 001 - 800-3687-7863 (KDD)
004 - 800-3687-7863 (ITJ)
0061 - 800-3687-7863 (IDC)
Korea 001 - 800-3687-7863 (Korea Telecom)
002 - 800-3687-7863 (Dacom)
Malaysia 00 - 800-3687-7863
Netherlands 00 - 800-3687-7863
New Zealand 00 - 800-3687-7863
0800-4413101
Norway 00 - 800-3687-7863
Singapore 001 - 800-3687-7863
Spain 00 - 800-3687-7863
Sweden 00 - 800-3687-7863 (Telia)
00 - 800-3687-7863 (Tele2)
Switzerland 00 - 800-3687-7863
Taiwan 00 - 800-3687-7863
United Kingdom 00 - 800-3687-7863
0800 121 6078
+44 (0) 118 953 3088