TWiki > Deployment Web > DeploymentInstallingUpgradingAndMigrating > CertificateManagementInIHSAndELM
Revision 2 - 2026-12-01 - 07:10:19 - ShradhaSrivastav

Certificate management in IBM HTTP Server (IHS) and IBM ELM via CLI

Authors: ShradhaSrivastav
Build basis: Engineering Lifecycle Management 7.0.x, IBM HTTP Server 9.0.x, WebSphere Liberty Profile

Starting with IBM Engineering Lifecycle Management (ELM) 7.0.3+, WebSphere Liberty is bundled with Java 11 or Java 17, which no longer ships the legacy graphical utility (ikeyman). Consequently, certificate and keystore management for both the application tier (WebSphere Liberty) and the web tier (IBM HTTP Server) must be performed using command-line interface (CLI) utilities.

This guide provides an end-to-end reference for generating, requesting, receiving, and managing SSL/TLS certificates using Java keytool, IBM Global Security Kit (gskcapicmd / gsk8capicmd), and openssl. It also covers step-by-step procedures, a comprehensive troubleshooting guide for common errors, and diagnostic procedures for resolving missing private key issues.

Overview and tooling architecture

Certificate management across an Enterprise ELM deployment is partitioned across two main tiers:

  • Web / reverse proxy tier (IBM HTTP Server):
    • Front-ends incoming user traffic on port 443.
    • Manages SSL termination and proxy routing using GSKit CLI (gskcapicmd / gsk8capicmd) and CMS (.kdb) / PKCS#12 (.p12) key databases.
  • ELM application tier (WebSphere Liberty):
    • Hosts core ELM applications (JTS, CCM, QM, RM, LQE, DCC, JRS, GC, LDX, and JAS) on secure backend ports (e.g., 9443).
    • Manages PKCS#12 (.p12) keystores using Java keytool.
  • Cryptographic packaging & conversion (openssl):
    • Used to combine detached private keys (.key) and public certificate chains (.crt / .p7b) into PKCS#12 (.p12) containers before importing into IHS or Liberty.

Architecture diagram

Architecture diagram

Command summary

Java keytool

Purpose

Manages PKCS#12 (.p12) keystores and certificates for WebSphere Liberty application profiles (JTS, CCM, QM, RM, LQE, DCC, JRS, GC, LDX, and JAS).

Location

[ServerInstallDir]/JazzTeamServer/server/jre/bin/keytool

Use when

  • Creating self-signed keystores for ELM application servers.
  • Generating Certificate Signing Requests (CSR) for internal or commercial Certificate Authorities.
  • Importing Root CA, Intermediate CA, and signed certificates into Liberty ibm-team-ssl.p12.
  • Importing external CA certificates into Java cacerts for outbound trust (LDAP, JAS, external integrations).

Affects

Liberty keystore Java cacerts IHS key database
Yes Yes No

GSKit gskcapicmd / gsk8capicmd

Purpose

Native IBM Global Security Kit CLI utility used to manage IBM HTTP Server (IHS) CMS (.kdb) and PKCS#12 (.p12) key databases, certificate requests, and password stash files (.sth).

Location

/bin/gskcapicmd or /bin/gsk8capicmd.sh (Linux/AIX) / gskcapicmd.bat (Windows)

Use when

  • Creating and initializing IHS key databases with password stashing.
  • Generating CSRs and receiving signed certificates for front-end web endpoints.
  • Adding signer CA certificates and validating certificate chains.
  • Stashing keystore passwords for WebSphere Web Server Plugins.

Affects

Liberty keystore Java cacerts IHS key database
No No Yes

openssl

Purpose

General-purpose cryptographic CLI tool used for certificate inspection and recombining detached private keys (.key) and certificate chains (.crt / .p7b) into PKCS#12 containers.

Use when

  • Assembling PKCS#12 files when certificates and private keys were delivered as separate files.
  • Extracting certificates or private keys from existing bundles.
  • Comparing cryptographic modulus hashes to verify key-certificate pairing.

Certificate operations matrix

Operation Java keytool (ELM Liberty) GSKit gskcapicmd (IHS) OpenSSL
Create key database Auto-created on -genkeypair -keydb -create -type PKCS12 N/A
Stash password Via securityUtility encode -keydb -stashpw N/A
Create self-signed cert -genkeypair -cert -create -req -newkey rsa:2048
Create CSR -certreq -certreq -create -req -new
Add CA / Signer cert -importcert -trustcacerts -cert -add Append to PEM bundle
Receive signed cert -importcert -cert -receive N/A
List certificates -list -v -cert -list -text -noout
Validate chain N/A -cert -validate -verify
Convert to PKCS12 -importkeystore -cert -import pkcs12 -export
Delete certificate -delete -cert -delete N/A

Decision tree

START
|
+-- Managing ELM Application Server (Liberty)?
|     +-- Create self-signed cert --------> keytool -genkeypair -keystore keystore.p12
|     +-- Request CA cert ---------------> keytool -certreq -alias default -file certreq.csr
|     +-- Install CA cert ---------------> keytool -importcert (Chain: Intermediate -> Root -> Signed)
|     +-- Trust remote service/LDAP -----> keytool -importcert -keystore server/jre/lib/security/cacerts
|
+-- Managing Web Server / Reverse Proxy (IHS)?
|     +-- Create key database -----------> gskcapicmd -keydb -create -stash -type PKCS12
|     +-- Generate self-signed cert -----> gskcapicmd -cert -create -default_cert yes
|     +-- Request CA cert ---------------> gskcapicmd -certreq -create -file req.arm
|     +-- Receive CA signed cert --------> gskcapicmd -cert -receive -file cert.cer
|     +-- Validate certificate chain ----> gskcapicmd -cert -validate -label <name>
|
+-- Third-party bundle / Private key missing?
|     +-- P7B lacks private key ---------> openssl pkcs12 -export (Combine Key + CRT)
|     +-- Verify personal cert ----------> gsk8capicmd.sh -cert -list (Look for '-' flag)
|     +-- Remove duplicate label --------> gsk8capicmd.sh -cert -delete
|     +-- Import into IHS ---------------> gsk8capicmd.sh -cert -import
|
+-- Encountering SSL / Handshake Errors?
      +-- "duplicate exists" ------------> Delete duplicate label before import
      +-- "GSK_ERROR_BAD_KEYFILE_PASSWORD" -> Re-stash password with -keydb -stashpw
      +-- "SSL0227E / cert not found" ---> Verify exact label with SSLServerCert in httpd.conf
      +-- "PKIX path building failed" ----> Import remote CA into JRE cacerts

Certificate management in IBM ELM (Liberty profile) via keytool

Liberty keystore configuration and password encryption

The keystore is defined in [ServerInstallDir]/JazzTeamServer/server/liberty/servers/clm/server.xml:

<keyStore id="defaultKeyStore"
          location="ibm-team-ssl.p12"
          type="PKCS12"
          password="{xor}Lz4sLCgwLTs=" />

Encrypt the keystore password using Liberty securityUtility:

cd [ServerInstallDir]/JazzTeamServer/server/liberty/wlp/bin
./securityUtility encode --encoding=aes <YourKeystorePassword>

Generating a self-signed certificate keystore

[ServerInstallDir]/JazzTeamServer/server/jre/bin/keytool -genkeypair \
  -alias default \
  -keyalg RSA \
  -keysize 2048 \
  -sigalg SHA256withRSA \
  -storetype PKCS12 \
  -keystore keystore.p12 \
  -storepass "<KeystorePassword>" \
  -keypass "<KeystorePassword>" \
  -validity 3650 \
  -dname "CN=elmserv1.fyre.ibm.com, OU=IT, O=IBM, L=Rochester, ST=Massachusetts, C=US"

Requesting and installing CA-signed certificates

1. Generate Certificate Signing Request (CSR):

[ServerInstallDir]/JazzTeamServer/server/jre/bin/keytool -certreq \
  -alias default \
  -keystore keystore.p12 \
  -storetype PKCS12 \
  -storepass "<KeystorePassword>" \
  -file certreq.csr \
  -sigalg SHA256withRSA

2. Import intermediate CA certificate:

[ServerInstallDir]/JazzTeamServer/server/jre/bin/keytool -importcert \
  -alias intermediateCA \
  -file intermediate.cer \
  -keystore keystore.p12 \
  -storetype PKCS12 \
  -storepass "<KeystorePassword>" \
  -trustcacerts -noprompt

3. Import root CA certificate:

[ServerInstallDir]/JazzTeamServer/server/jre/bin/keytool -importcert \
  -alias rootCA \
  -file root.cer \
  -keystore keystore.p12 \
  -storetype PKCS12 \
  -storepass "<KeystorePassword>" \
  -trustcacerts -noprompt

4. Import CA-signed server certificate (must match original alias):

[ServerInstallDir]/JazzTeamServer/server/jre/bin/keytool -importcert \
  -alias default \
  -file cert.der \
  -keystore keystore.p12 \
  -storetype PKCS12 \
  -storepass "<KeystorePassword>"

Expected confirmation: Certificate reply was installed in keystore

Keystore maintenance commands

  • List certificates: keytool -list -v -keystore keystore.p12 -storetype PKCS12 -storepass ""
  • Delete alias: keytool -delete -alias default -keystore keystore.p12 -storetype PKCS12 -storepass ""
  • Export certificate: keytool -exportcert -alias default -file cert.cer -keystore keystore.p12 -storetype PKCS12 -storepass ""

Certificate management in IBM HTTP Server (IHS) via GSKit CLI

Understanding gskcapicmd versus gskcmd

In IBM Global Security Kit (GSKit) and IBM HTTP Server (IHS), both gskcapicmd and gskcmd are command-line utilities used for certificate, key database, and password stash file management. The primary difference lies in their underlying runtime architecture:

  • =gskcapicmd= (or gsk8capicmd / gsk8capicmd_64):
    • Native C/C++ executable: Invokes the native IBM GSKit C runtime libraries directly.
    • Zero Java dependency: Runs entirely without requiring a Java Runtime Environment (JRE) or JAVA_HOME.
    • High performance: Instantaneous execution without JVM startup latency.
    • Recommended standard: IBM recommended utility for modern IHS deployments, container images, and automation scripts.
  • =gskcmd= (or gsk8cmd / gsk7cmd):
    • Java-based wrapper: A shell or batch script wrapper that invokes Java to execute the command-line interface of the legacy ikeyman tool (com.ibm.gsk.ikeyman.cmd.KeyMan).
    • Java runtime requirement: Requires an installed, compatible Java JRE configured in JAVA_HOME or the system PATH.
    • JVM startup overhead: Incurs Java virtual machine initialization overhead.
    • Legacy support: Deprecated in environments where Java is unbundled from IHS.

Feature / Dimension gskcapicmd (or gsk8capicmd) gskcmd (or gsk7cmd)
Runtime architecture Native C / C++ binary Java CLI wrapper
JRE / Java requirement None (Runs without Java) Requires Java JRE (JAVA_HOME)
Startup speed & footprint Instantaneous, low memory Slower (JVM initialization)
Binary / script names gskcapicmd, gsk8capicmd, gsk8capicmd.sh, gskcapicmd.bat gskcmd, gsk8cmd, gskcmd.bat
Standards compliance Native FIPS 140-2/3, Suite B, NIST SP 800-131A Dependent on Java crypto providers
Recommended usage Standard for all automation, scripts, and administration Legacy scripts requiring Java environment

Key database creation and stashing

cd <IHS_ROOT>/bin

# Create PKCS#12 database and generate stash file (.sth)
./gskcapicmd -keydb -create -db ihskey.p12 -pw "<DBPassword>" -stash -type PKCS12

# Stash password on existing key database
./gskcapicmd -keydb -stashpw -db ihskey.p12 -pw "<DBPassword>" -type PKCS12

Self-signed certificate creation

./gskcapicmd -cert -create \
  -db ihskey.p12 \
  -pw "<DBPassword>" \
  -label "IHS" \
  -dn "CN=ihs.example.org,OU=IT,O=IBM,C=US" \
  -size 2048 \
  -sig_alg SHA256WithRSA \
  -expire 365 \
  -default_cert yes

CA-signed certificate workflow

1. Create Certificate Signing Request (CSR):

./gskcapicmd -certreq -create \
  -db ihskey.p12 \
  -pw "<DBPassword>" \
  -label "IHS" \
  -dn "CN=ihs.example.org,OU=IT,O=IBM,C=US" \
  -size 2048 \
  -sig_alg SHA256WithRSA \
  -file ihs_certreq.arm

2. Add root and intermediate CA signers:

./gskcapicmd -cert -add -db ihskey.p12 -pw "<DBPassword>" -label "RootCA" -file root.crt -format ascii
./gskcapicmd -cert -add -db ihskey.p12 -pw "<DBPassword>" -label "IntermediateCA" -file intermediate.crt -format ascii

3. Receive signed certificate:

./gskcapicmd -cert -receive \
  -db ihskey.p12 \
  -pw "<DBPassword>" \
  -file signed_cert.cer \
  -format ascii \
  -default_cert yes

Inspection, validation, and maintenance

  • List certificates: ./gskcapicmd -cert -list -db ihskey.p12 -stashed
  • Certificate details: ./gskcapicmd -cert -details -db ihskey.p12 -stashed -label "IHS"
  • Validate certificate chain: ./gskcapicmd -cert -validate -db ihskey.p12 -stashed -label "IHS"
  • Set as default: ./gskcapicmd -cert -setdefault -db ihskey.p12 -stashed -label "IHS"
  • Delete certificate: ./gskcapicmd -cert -delete -db ihskey.p12 -stashed -label "OldLabel"

Common troubleshooting scenarios

Scenario 1: duplicate exists / Duplicate label collision

Cause

A signer certificate or older personal certificate with the identical DN or label already exists in the target key database.

Recommended commands

# 1. List existing certificates to identify collision
./gsk8capicmd.sh -cert -list -db IHS_key.p12 -stashed

# 2. Delete the duplicate certificate
./gsk8capicmd.sh -cert -delete -db IHS_key.p12 -stashed -label "conflicting_label"

# 3. Import new certificate with unique label
./gsk8capicmd.sh -cert -import -db new.p12 -pw "<pw>" -target IHS_key.p12 -target_stashed -new_label "newCert"

Scenario 2: GSK_ERROR_BAD_KEYFILE_PASSWORD / Stash file out of sync

Cause

The key database password was changed without updating the .sth stash file, or file system permissions prevent IHS from reading the stash file.

Recommended commands

# Re-stash password for the key database
cd <IHS_ROOT>/bin
./gsk8capicmd.sh -keydb -stashpw -db /opt/IBM/HTTPServer/conf/ihskey.p12 -pw "<ActivePassword>" -type PKCS12

# Ensure proper read permissions
chmod 640 /opt/IBM/HTTPServer/conf/ihskey.*
chown ihsuser:ihsgroup /opt/IBM/HTTPServer/conf/ihskey.*

Scenario 3: SSL0227E / Certificate label mismatch in httpd.conf

Cause

The SSLServerCert directive in httpd.conf is case-sensitive and does not match the actual certificate label stored in the key database.

Recommended commands

# Check exact label in key database
./gsk8capicmd.sh -cert -list -db ihskey.p12 -stashed

Update httpd.conf:

SSLServerCert "ExactLabelName"

Or set as default certificate:

./gsk8capicmd.sh -cert -setdefault -db ihskey.p12 -stashed -label "ExactLabelName"

Scenario 4: GSK_ERROR_UNTRUSTED_ROOT / Missing intermediate signers

Cause

The certificate chain is incomplete because Intermediate or Root CA certificates were not imported into the key database.

Recommended commands

# Add intermediate CA signer
./gsk8capicmd.sh -cert -add -db ihskey.p12 -stashed -label "IntermediateCA" -file intermediate.crt -format ascii

# Add root CA signer
./gsk8capicmd.sh -cert -add -db ihskey.p12 -stashed -label "RootCA" -file root.crt -format ascii

# Validate chain
./gsk8capicmd.sh -cert -validate -db ihskey.p12 -stashed -label "IHS"

Scenario 5: PKIX path building failed / Outbound SSL trust failure

Cause

ELM application (JTS, LQE, DCC) cannot establish an outbound SSL connection to LDAP, JAS, or another ELM server because the target certificate is not trusted by the Java JRE.

Recommended command

[ServerInstallDir]/JazzTeamServer/server/jre/bin/keytool -importcert \
  -alias remote-service-ca \
  -file remote_ca.cer \
  -keystore [ServerInstallDir]/JazzTeamServer/server/jre/lib/security/cacerts \
  -storepass changeit \
  -noprompt

Scenario 6: java.lang.Exception: Public keys in reply and keystore don't match

Cause

Importing a CA reply into an alias that does not correspond to the private key used when the CSR was created.

Recommended recovery

If keypair was generated externally, import the complete PKCS#12 bundle:

keytool -importkeystore \
  -srckeystore external.p12 -srcstoretype PKCS12 \
  -destkeystore keystore.p12 -deststoretype PKCS12 \
  -srcstorepass "<src_pw>" -deststorepass "<dst_pw>"

Detecting and resolving missing private key issues

A common issue when importing certificates (especially PKCS#7 .p7b files, standalone CA responses, or third-party wildcard cert bundles) is that the certificate is imported as a signer/trusted certificate only (!), lacking the associated private key (-). Without the private key, the server cannot perform TLS/SSL handshakes or decryption.

Diagnostic commands to detect missing private key

1. In GSKit (gskcapicmd / gsk8capicmd)

# List certificates with password
gsk8capicmd.sh -cert -list -db example_bundle.p7b -pw "<Password>"

# Or using password stash file
gsk8capicmd.sh -cert -list -db IHS_key.p12 -stashed

Interpreting output symbols:

Certificates found
* default, - personal, ! trusted, # secret key
! "CN=*.example.com,O=Example Corporation,ST=New York,C=US"

Flag Meaning Private key status Server usable?
! Trusted certificate (Signer/CA only) ❌ MISSING No (Handshake failure)
- Personal certificate ✅ PRESENT Yes (Valid for SSL)
* Default personal certificate ✅ PRESENT Yes (Active default cert)

Note: PKCS#7 (.p7b / .p7c) files contain only the public certificate chain and never contain private keys.

2. In Java keytool (ELM Liberty keystores)

keytool -list -v -keystore keystore.p12 -storetype PKCS12 -storepass "<Password>"

  • Entry type: trustedCertEntry $\rightarrow$ ❌ Private key is MISSING.
  • Entry type: PrivateKeyEntry $\rightarrow$ ✅ Private key is PRESENT.

3. In OpenSSL / PEM files

# 1. Check for private key section inside PEM file
grep -E "BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY" cert_or_key_file.pem

# 2. Verify that Private Key matches the Public Certificate (compare MD5 hashes of modulus)
openssl rsa -noout -modulus -in Private.key | openssl md5
openssl x509 -noout -modulus -in server.crt | openssl md5

Matching MD5 hashes confirm the private key corresponds to the certificate.

Step-by-step workflow to fix missing private key

When you have a detached private key (Private.key) and certificate (.crt / .cer / .p7b):

Step 1: Combine private key and CRT into a new PKCS#12 (.p12) using OpenSSL

openssl pkcs12 -export \
  -out new.p12 \
  -inkey Private.key \
  -in example_com.crt \
  -name "newCert" \
  -passout pass:passwd123

Step 2: Confirm the new PKCS#12 contains a personal certificate (-)

gsk8capicmd.sh -cert -list -db new.p12 -pw passwd123

Output will confirm: - "CN=*.example.com..." indicating the private key is attached.

Step 3: Remove conflicting signer-only entry in target IHS keystore

If the target IHS_key.p12 already contains the same certificate as a trusted signer (!), the import will fail with duplicate exists:

# 1. List existing entries
gsk8capicmd.sh -cert -list -db IHS_key.p12 -stashed

# 2. Delete the duplicate signer certificate
gsk8capicmd.sh -cert -delete -db IHS_key.p12 -stashed -label "conflicting_label"

Step 4: Import personal certificate into IHS keystore

gsk8capicmd.sh -cert -import \
  -db new.p12 \
  -pw passwd123 \
  -target IHS_key.p12 \
  -target_stashed \
  -new_label newCert

Step 5: Validate certificate chain

gsk8capicmd.sh -cert -validate -label newCert -db IHS_key.p12 -stashed

Expected output: OK

Quick reference

Situation Tool Recommended command
Generate new self-signed Liberty keystore Java keytool keytool -genkeypair -alias default -storetype PKCS12 -keystore keystore.p12
Generate CSR for ELM server Java keytool keytool -certreq -alias default -file certreq.csr -keystore keystore.p12
Import CA chain to Liberty Java keytool keytool -importcert -alias -file -keystore keystore.p12 -trustcacerts
Trust external LDAP / JAS cert in ELM Java keytool keytool -importcert -keystore server/jre/lib/security/cacerts
Create new IHS key database GSKit gskcapicmd gskcapicmd -keydb -create -db ihskey.p12 -pw -stash -type PKCS12
Generate self-signed cert for IHS GSKit gskcapicmd gskcapicmd -cert -create -db ihskey.p12 -label IHS -default_cert yes
Receive signed certificate into IHS GSKit gskcapicmd gskcapicmd -cert -receive -db ihskey.p12 -file cert.cer -default_cert yes
Validate certificate in IHS GSKit gskcapicmd gskcapicmd -cert -validate -db ihskey.p12 -stashed -label
Stash plugin password GSKit gskcapicmd gskcapicmd -keydb -stashpw -db -pw -type PKCS12
Package detached key and CRT openssl openssl pkcs12 -export -out new.p12 -inkey Private.key -in cert.crt
Fix missing private key (.p7b) openssl + GSKit Re-export to .p12 with openssl, delete duplicate in IHS, and import with gsk8capicmd.sh -cert -import

Related topics: Configure CA and self-signed certificates in Liberty or IHS for ELM 7.0.3, Distributed deployment of ELM on Liberty profile using IBM HTTP Server, Deployment administering web, Keytool guide

External links: IBM Support: Renewing certificate using CLI

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by IBM and non-IBM contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use. Please read the following disclaimer.
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.