Using a third-party Certificate Authority
Install the CA root certificate
Instead of setting up its own certificate authority, a company may use a third-party certificate authority to sign its server certificates. The client and server must have access to the third-party CA's root certificate to verify the server certificates that are signed by the third-party CA.
GSKit ships with a collection of third-party root certificates from well-known CA companies, such as Thawte, Verisign, and Entrust. If the server is going to use one of these well-known companies to sign its certificates, this step can be skipped. But if the server is going to use certificates from a third-party CA whose root certificate is not shipped with GSKit, the third-party CA's root certificate must be imported to both the server and the clients' key database files as follows:
- Obtain the CA root certificate. The process for this varies depending on the third-party CA's procedures. Third-party CAs often make their root certificates available for download.
- Add the third-party's root CA certificate to both server and
client key databases and mark it as trusted as follows:
gsk8capicmd -cert -add -db server.kdb -stashed -label "Some CA root" -file ca.der -format binary -trust enable
gsk8capicmd -cert -add -db client.kdb -stashed -label "Some CA root" -file ca.der -format binary -trust enableThis example uses a third-party CA root certificate that is in a binary format. If the certificate is in an ASCII format, use the
-format asciioption. The-dbparameter specifies the name of the key database to import the third-party CA root certificate into. The-labelparameter specifies the label to use for the third-party CA root certificate inside the key database file. The-fileparameter specifies the file that contains the third-party CA root certificate.
Requesting a certificate using a signing request
In this scenario, GSKit creates a certificate request, the third-party CA signs the certificate in the request, and GSKit imports the signed certificate into the server key database.
- Generate a server certificate request using the server's key
database file:
gsk8capicmd -certreq -create -db server.kdb -stashed -label "Some CA signed certificate" -dn "CN=host.mycompany.com,O=company,C=country" -file cert_request.armThe
-dbparameter specifies the name of the server's key database file. The-labelparameter specifies a label to refer to the newly created certificate in the key database file. The-dnparameter specifies the distinguished name to be used on the server's certificate. The-fileparameter specifies the file to contain the exported certificate signing request. TheCNparameter specifies the DNS name of your server. This is necessary for an SSL client to validate the certificate.
You can also request SAN extension by using-san_dnsnameor-san_ipaddroptions (not supported in version 7). For example:gsk8capicmd -certreq -create -db server.kdb -stashed -label "Some CA signed certificate" -dn "CN=host.mycompany.com,OU=unit,O=company" -san_dnsname "host1.mycompany.com,host2.mycompany.com" -san_ipaddr "10.10.10.1,10.10.10.2" -file cert_request.arm - Send the certificate request (that is, the cert_request.arm file) to the CA. The process for submitting a certificate signing request varies among CA companies. Often the signing request can be submitted using a web form.
- The CA then returns the signed certificate. In this scenario, the assumption is that the signed certificate is in a file that is called cert_signed.arm and is in an ASCII format.
- Receive the signed certificate into the server's key database file
and set it as the default for communicating with clients:
gsk8capicmd -cert -receive -db server.kdb -stashed -file cert_signed.arm -default_cert yesThe
-dbparameter specifies the name of the server's key database file. The-fileparameter specifies the name of the file that contains the signed certificate.
Requesting a certificate without a signing request
Some Certificate Authorities do not accept signing request files. Instead, they generate the signing request internally on behalf of the requesting server and then sign it as one transaction. The CA then returns to the server two files, one containing the private key for the server to use and one containing the signed server certificate. In this example, the assumption of the two files is as follows:
- host.mycompany.com.crt: This is the file that contains the signed server certificate.
- host.mycompany.com.key: This is the file that contains the server's private key
To use these files, they must be converted to an industry standard format called PKCS12 before they can be imported into a key database.
- Use OpenSSL to convert the two files into a PKCS12 file as
follows:
openssl pkcs12 -export -in host.mycompany.com.crt -inkey host.mycompany.com.key -out host.mycompany.com.p12 -name "CA signed"The OpenSSL command prompts you to enter a password. This password is only used temporarily so it can be any arbitrary password. In this example, the password is set to
abc. The-inparameter specifies the file that contains the signed server certificate. The-inkeyparameter specifies the file that contains the server's private key. - Import the certificate from the PKCS12 file to the server's key
database file as follows:
gsk8capicmd -cert -import -db host.mycompany.com.p12 -pw abc -target server.kdbThe
-dbparameter specifies the name of the PKCS12 file. The-pwparameter specifies the password that protects the PKCS12 file. The-targetparameter specifies the name of the server's key database file. You are prompted for the password that protects the target database file. - Make the imported certificate the default certificate to use for
communications as follows:
gsk8capicmd -cert -setdefault -db server.kdb -stashed -label "CA signed"The
-dbparameter specifies the name of the server's key database file. The-labelparameter specifies a label of the imported certificate.


