"All the signer certificates must exist in the key database"
"Error processing X509 certificates" (MUST check entire certificate chain for all of these issues)
"The database cannot be created or opened because permission was denied by the operating system"
If this message is seen while opening a PKCS11 cryptographic token:
Otherwise, verify the KDB is writable by the user running ikeyman.
gsk7cmd -certreq -list
doesn't show some certificate requests
If a certificate request is recreated via the -certreq -recreate
action in gsk7cmd or gsk7capicmd,
it will not appear in the list of certificate requests.
Solution: The certificate remains in the Personal Certificates list only, and Ikeyman will still allow you to perform a receive operation on the renewal.
gsk7capicmd -cert -receive
returns GSKKM_ERR_REQKEY_FOR_CERT_NULL
gsk7capicmd before version 7.0.4.20 cannot receive a certificate that was issued as a result of a a "renew" or "recreate request".
Solution: Use an identical command line but substitute gsk7cmd
for
gsk7capicmd
Why doesn't an imported personal certificate show up with "trust" status?
The tooling is in error, because trust status is never applicable to personal certificates (certificates with a private key). GSKit v8 will not show trust status on any personal certificates.
1. Right click in the Ikeyman icon and select "Properties" 2. On the properties dialog select the "Compatibility" tab 3. In the "Compatibility mode" section of this tab tick the "Run this program in compatibility mode for:" check box. 4. Select "Windows 95" from the resultant list box. 5. Press "OK" on the "Properties" dialog box 6. Run Ikeyman as normal
If you try to use Ikeyman on Windows XP and the window is displaying with blank controls, then you may be able to solve it using one of the following:
Possible Solution 1:
(Ikeyman must be invoked from the Start menu for this to help. It won't
help for invoking the ikeyman.bat from a command-prompt.)
1. Locate Ikeyman in the Start menu ('All Programs -> IBM HTTP Server V6.1 -> Start Key Management Utility') 2. Right-click this entry and select "Properties" 3. On the properties dialog select the "Compatibility" tab 4. In the "Compatibility mode" section of this tab tick the "Run this program in compatibility mode for:" check box. 5. Select "Windows 2000" from the resultant list box. 6. Press "OK" on the "Properties" dialog box 7. Run Ikeyman as normal
Possible Solution 2:
There is also reported success with solving this by disabling
DirectX features per:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6311320
To receive a certificate, your KeyFile must be able to validate the new certificate all the way up to a trusted root in the signer certificate section of the KDB.
If your certificate was issued by a certificate authority that is not among the default trusted certificate authorities automatically included in new KDB files by ikeyman, you must add the certificate of the issuer (the signer) to your KDB before receiving your certificate
If ikeyman still issues the same error message when you try to receive your certificate, use the following procedure to verify that the signer certificate is the same as the one that actually signed your certificate
openssl x509 -text -in
certificate_from_certificateauthority.crt|grep Issuer:
openssl x509 -text -in signer_certificate.cer |grep
Subject:
Some certificate authorities issue certificates that are signed by an intermediate issuer, and not one of the default trusted root CA certificates that are pre-loaded into your KDB. Your certificate authority should provide any intermediate certificates required to build the trust chain and you must add them to your KDB before receiving your signed certificate.
Solution: To add the correct intermediate certificate(s), download all intermediate certificates from your certificate authority. Perform the steps outlined here for each certificate starting from the root CA and ending with the signer certificate that issued your certificate.
If the certificate you are trying to receive or add contains an Authority Key Identifier (AKI), the issuer of this certificate in your KDB must have a Subject Key Identifier (SKI) with the same value.
The AKI/SKI can be an arbitrary binary value, or a combination of the issuers DN and Serial Number.
Both intermediate and end-entity certificates may contain an AKI.
openssl x509 -in intermediate.crt -text|grep
-C1 "X509v3 Authority Key Identifier:" &&
openssl x509 -in root.crt -text|grep -C1 "X509v3
Subject Key Identifier:"
X509v3 Authority Key Identifier: keyid:7B:58:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX X509v3 Subject Key Identifier: keyid:4A:D3:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Solution: Contact certificate authority for the proper version (possible Serial Number bump) of the issuer certificate with the matching SKI.
Solution: This can occur when importing from a PKCS12 or CMS key file, onto a CMS Cryptographic Token. It is resolved by upgrading GSKit to at least 7.0.3.27 and removing gskikm.jar.
If upgrading and removing gskikm.jar does not resolve the issue, adding the private key and signer certificates in separate steps can sometimes workaround the issue:
Solution: Receive certificate into the KDB that made original request or resubmit certificate request.
Reported Symptom: When selecting a country name from the selection box, the select box may be reset to default (US)
Solution: Display ikeyman on a different X11 server, or contact X11 server vendor.
In IHS 7.0 and earlier, the bundled java's gskikm.jar provides a different level of Ikeyman than what's bundled with GSKit. This can cause differences in the version numbers reported between the java-based certificate management tools and the native GSKit and IHS runtimes.
In IHS 6.1 and earlier, a manual post-install configuration step is required to setup IHS to use the proper (up to date) certificate management implementation. See #GSKIKM for instructions.
In IHS 7.0, leaving gskikm.jar in place causes a more up to date Ikeyman and gsk7cmd to be used (v8). To revert to the legacy Ikeyman 7.0 with IHS 7.0, see #GSKIKM.
$IHSROOT/java/jre/lib/ext/gskikm.jar
is present.
$IHSROOT/bin/gsk7cmd
also uses the updated codebase.
A file provided by the IBM JRE, gskikm.jar, can override the version of Ikeyman, which would otherwise be dictated by the level of GSKit maintenance applied alongside IHS.
Solution: Ensure the JVM being used to run Ikeyman does not have a file named gskikm.jar under $JAVA_HOME/jre/lib/ext/. If this file exists move it into a different directory (changing the filename alone is not sufficient).
On windows, a stray gsk7*.dll in the C:\Windows\system32 can cause IHS to report (and use) the wrong GSKit level at startup. No GSKit files should be present in this directory.
IHS 7.0 before 7.0.0.5 can report this error when installed from the 64-bit supplement CDs, because of a mismatch between the architecture of the bundled Java and the architecture of the bundled GSKit.
This is resolved automatically at version 7.0.0.5 and later.
IHS 6.1.0.11 and earlier, installed from 64-bit WebSphere images (including images for 64-bit Linux and Windows), cannot create CMS key databases because the bundled 64-bit JRE cannot properly load the 32-bit GSKit CMS native library.
This problem is corrected in IHS 6.1.0.13 and later, where both a 32-bit and 64-bit GSKit are installed on 64-bit platforms. The updated ikeyman script will choose the appropriate version of GSKit to run based on the architecture of the JRE found at runtime.
"The library initialization routine was not successfully called."
mv IHSROOT/java/jre/lib/ext/gskikm.jar IHSROOT/lib
This symptom has been observed in IHS 7.0 with GSkit 7.0.4.27 on AIX.
IHS 6.1 and earlier: Ensure the JVM being used to run Ikeyman does not have a file named gskikm.jar under $JAVA_HOME/jre/lib/ext/. See removing gskikm.jar.
All releases prior to 7.0: Validate your global GSKit installation
Linux: Make sure RPM compat-libstdc++ is installed (ldd `which gsk7ver` should not be missing any libraries)
Solution: install compat-libstdc++ which provides libstdc++.so.5
If the procedure in the following technote has been followed to enable 2048 bit keys for v6.0, then this
same problem can cause the key to be 2047 bit insetad of 2048:
The iKeyman utility within IBM HTTP Server V6.0 does not provide the option to create a certificate request (CSR) 2048 key size
Solutions:
If your certificate is part of an existing key database, you can extract the certificate with the following command. Otherwise, you can analyze your certificate directly.
In ikmtrace.log (ikeyman -x
output), the Java exception
looks like:
openssl x509 -in cert.arm -noout -text|grep -C1
EMPTY
X509v3 Issuer Alternative Name: <EMPTY>
Solution: CA needs to recreate compliant certificate
Use openssl command line tool to view the ASN.1 structures:
openssl asn1parse -in cert.arm | grep T61
503:d=5 hl=2 l= 23 prim: T61STRING :MyCA $50 Warranty
In this second example, the cert has some non US-ASCII bytes in a certificate field, any unprintable output in the first command, or any output at all in the second, is a sign to try the workaround below:
$ openssl asn1parse -in clientcert.arm | egrep 'T61'
223:d=5 hl=2 l= 14 prim: T61STRING :Testbruger ���
$ openssl asn1parse -in clientcert.arm | egrep 'T61'|od -t x1|egrep '[89abcdef][0-9a-zA-Z]'
0000060 54 65 73 74 62 72 75 67 65 72 20 e6 f8 e5 0a
Solution: CA needs to recreate compliant certificate; note that RFC3280 deprecates the use of T61String in new certificates.
Workaround: Set environment variable GSK_T61_AS_LATIN1=YES in <ihsinst>/bin/envvars
The NameConstraints extension must not be empty, or Java will reject the certificate.
openssl asn1parse -in CA.cer | grep :2.5.29.30 | awk -F: '{print $1}'
If there's no output, the certificate doesn't have this bug.
openssl asn1parse -in CA.cer -strparse number
The *.cer sent by your certificate authority is normally a single X509 certificate, but some issuers provide what amounts to an entire keyring embedded in the *.cer and ikeyman cannot use this directly. This format is not fully supported by GSKit.
If openssl x509 -in certificate.cer -text
produces an error message but
openssl pkcs7 -print_certs < certificate.cer
does not, then you have a PKCS7
file.
The output of the previous command lists a series of certificates. Find the certificate you requested by looking for a line beginning with "subject=" and containing the Distinguished Name you specified at certificate request time.
Copy everything between (and including) the "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" markers into a new file (certN.arm), and make sure your file begins and ends with these markers and includes no additional blank lines.
If the User Notice field of the Certificate Policies extension is an empty sequence, the level of Java in the base IHS 6.1.0.0 install will throw an exception during certificate management.
$ openssl x509 -in failing.arm -text | grep -C1 "User Notice:"
CPS: 1.2.4.5.5 User Notice: ^^^^^^^^^^^^^^^ whitespace
$ dumpasn1 failing.der | grep -A2 unotice
686 8: OBJECT IDENTIFIER unotice (1 3 6 1 5 5 7 2 2) 696 0: SEQUENCE {} ^^^^^^^^^^^ empty sequence
Solution: Upgrading the bundled JRE to latest available SDK maintenance will fix the problem.
6.1.0-WS-WASSDK-AixPPC32-FP0000017
) and use the
Update Installer to apply it to the IBM HTTP Server
installation just as you would for an IBM HTTP Server fix pack.
gsk7ikm
directly.
When software other than ikeyman is used to create a certificate or certificate request, the servers certificate may use a DSA key instead of an RSA key. DSA keys are not supported as server certificates.
When such a certificate is selected for an SSL handshake, IHS issues the following message:
SSL0210E: SSL Handshake Failed, ERROR validating ASN fields in certificate.
openssl x509 -in cert.arm -text|grep "Public Key Algorithm"
Public Key Algorithm: dsaEncryption ^^^
To check In ikeyman, select the detailed view of the personal certificate and find the "Subject Public Key Information" field. A value of OID 1.2.840.10040.4.1 signifies a DSA public key.
Solution: Create a new certificate request, either using ikeyman or forcing the use of an RSA key.
When cryptographic hardware is in use, iKeyman will sometimes report "Error processing X509 certificate" instead of "All the signer certificates must exist in the key database" when the issuer of a certificate you're receiving is not present in your secondary key file.
Verify the issuer of the certificate you're trying to receive exists in the "Signer Certificates" section in iKeyman
Solution: Remove the expired cached copy of the intermediate certificate from the browser's SSL configuration.
If a subset of the user's client certificates can be validated by the servers list of certificate authorities, the browser will display that partial list of certificates to the user.
Solution: The issuer of the client certificates must be added as a trusted Certificate Authority in the servers KeyFile.
To test if the cryptography level in your PKCS12 file exceeds the JCE defaults, use the keytool command supplied in your JRE:
keytool -list -v -keystore /tmp/your.p12
-storetype pkcs12 -storepass password
... Unsupported keysize or algorithm parametersSolution: Install the appropriate JCE policy files for your JRE:
Java 1.4.2 on HPUX, Solaris: Sun unrestricted JCE policy files
Continue on for another common cause of this error message
Outside of PCKS12 keystores, the most common cause of this message is using an incorrect password. If IHS can service SSL requests (even if clients terminate the handshake due to an expired individual certificate) with the KDB, that means the KDB is not corrupt and the password being provided does not matched the stashed password.
$JAVA_HOME/lib/ext/gskikm.jar
to $JAVA_HOME/lib/ext/gskikm.bak
as described
here
If you cannot add a CA certificate using ikeyman, and you're sure it's not actually a duplicate, try adding
the CA with gsk7capicmd
to check if a different error code is issued.
If the error reported by gsk7capicmd
is GSKKM_ERR_VALIDATION_KEY_SIGNATURE, and you're using
GSKit 7.0.4.1 or higher, see DER encoding error below.
When validating a certificate, GSKit versions 7.0.3.22 and higher first converts the certificate to a BER encoding, the most detailed encoding of the certificate, and then into the ubiquitous DER form. CA issuers calculate certificate signatures over the DER encoding. GSKit always sends this calculated DER-encoding of the certificate to the client.
The DER specification dictates that default values must not be present in the DER-encoded representation. If a certificate uses an illegally constructed DER, or if the certificate authority has signed either the BER-encoded form or a malformed DER-encoded form, the following may occur:
Any extension in a certificate may contain an element of a sequence with a default value. If a DER-encoded certificate contains such default values explicitly listed in the certificate, the signature is likely to be incorrect and the incompatabilities listed above are likely to arise.
A common example is the "criticality" field present in each certificate extension, which immediately follows the specific extension type in the ASN.1 encoding. This field defaults to FALSE (0), and should never appear with a value of '0' in a proper DER encoding. The definition of the structure of each certificate extension is included below:
Extension ::= SEQUENCE { extnId EXTENSION.&id ({ExtensionSet}), critical BOOLEAN DEFAULT FALSE, extnValue OCTET STRING -- contains a DER encoding of a value of type &ExtnType -- for the extension object identified by extnId }
In the example below of an invalid DER encoding, the beginning "SEQUENCE" marks a new certificateExtenson whose first field is the id of a particular extension (formatted for us by openssl below as "X509v3 Basic Constraints") and whose second field is a boolean with a default of false. A proper DER encoding, and thus a proper signature value, would not include the "BOOLEAN" line with a value of 0 below:
$ openssl asn1parse -in /tmp/pmrs/ok-ca.cer|grep -B1 'BOOLEAN :0'
507:d=4 hl=2 l= 15 cons: SEQUENCE 509:d=5 hl=2 l= 3 prim: OBJECT :X509v3 Basic Constraints 514:d=5 hl=2 l= 1 prim: BOOLEAN :0 <--- criticality field, should not be present, or part of signature, in DER form 517:d=5 hl=2 l= 5 prim: OCTET STRING [HEX DUMP]:30030101FF
Each extension must be checked against its definition in the OID database, as there are also extension-specific fields which may contain default-valued fields that must NOT be encoded with their default values.
Contact your certificate authority and provide them the info above to re-issue your certificate (or CA, depending on which is invalid). No workaround or circumvention is possible as improper DER encoding causes invalid cryptographically secure signatures which various software will need to check. If client software complains about re-use of serial numbers or other unusual certificate errors, some relief may be provided if you move to an environment where all HTTP Servers use 7.0.3.22 or later.
Possibly symptoms include:
See http://www-01.ibm.com/support/docview.wss?uid=swg21313367 for mandatory environemnt variables to be set for Ikeyman, gsk7capcimd, and the IHS runtime when crypto offload is used on z/Linux with GSKit 7.0.4.14 and later.
pkcsconf
tool, some error messages may not have
been noticed and the "user PIN" may not have been set after
being initialized. The PIN may also have been locked due to too many
failing password attempts.
If ikeyman crashes due to this issue, the top of the javacore backtrace will look like this:
com.ibm.gsk.ikeyman.basic.CryptographicToken.c_BuildKeyLabelList(Native Method)
The user PIN must be changed/set (pkcsconf
-p
) after being initialized (pkcsconf
-u
). If the user PIN is locked due too many incorrect passwords,
the token must be re-initialized (pkcsconf -I
)
See the How can I tell if my PKCS11 token is ready to be used by IBM HTTP Server? FAQ for information
on interpreting/remediating pkcsconf
flags
Verify the SSLServerCert
directive starts with the same "Label" as displayed by
pkcsconf -t
If your token mysteriously becomes empty on Linux, contact your Linux vendor for an updatad opencryptoki to a version subsequent to 2.2.8 that includes a fix for an issue that causes the on-disk soft-token to be truncated to 0 bytes. If this forces you to create your token, you may want to backup /var/lib/opencryptoki regularly.
The file pointed to by the SSLStashFile
directive, created with the <ihsinst>/bin/sslstash utility,
does not contain the same password as the user PIN associated with the token indicated in SSLServerCert
directive.
Solution: Open your cryptographic token in ikeyman and verify the token name and label for your personal cert
match your SSLServerCert directive in httpd.conf. Use the <ihsinst>/bin/sslstash utility to re-stash the
User PIN to the file referenced by your SSLStashFile
directive.
You can query the cryptographic token on the command line, substituting your token label and password, with the command below. To be usable with IHS, you should have at least one result that has a private key (displayed with a dash in the first column)
Certificates found: * default, - has private key, ! trusted myca - mylabel
If no personal certificates exist, they must be created via ikeyman before IHS can use the crypto card.
Some non-GSKit certificate management utilities allow you to create private keys with one password and store them in a keystore with a different password. In GSKit utilities, it is assumed the private key and keystore password are the same.
If you try to import a personal certificate of this type, GSKit will report that the private key is corrupted or unsupported, because it tries to decrypt it with the keystore password.
The only known workaround is to use whatever native tool created the keystore and change the passwords.
In IBM HTTP Server v7 or later, the Ikeyman v8 bundled with java lists some personal certificates twice.
This will be fixed in future JSSE maintenance. In the interim, backing up then removing the
key.rdb
request database will remove the GUI abnormality.
When issuing a certificate, Verisign may add custom text to the Distinguished Name of the requested certificate in several Organizational Unit (OU) fields. When you renew this certificate via ikeyman, the Certificate Signing Request (CSR) will include the additional OU fields originally added by Verisign.
Verisign may reject the CSR because it already explicitly contains the Verisign OU.
Solution: Create a new certificate signing request instead of clicking "renew" in Ikeyman.
GPKI is an SSL certificate standard published by the government of Japan that deviates from the two standards supported by IHS and the Tivoli Global Security Kit (GSKit). One such deviation that does not pass validation is an issuer chain with both a critical "Certificate Policies" (or any other RFC3280-specific) extension and a non-critical "Basic Constraints" extension
The presence of an RFC3280-specific critical extension (e.g. Certificate Policies) anywhere in the validation chain
forces GSKit to validate the certificate using RFC3280/PKIX rules,
however PKIX rules state that issuer certificates MUST set the "Basic Constraints" extension as
critical. These certificates fail validation. IHS 6.1.0.9 and later can support this specific deviation in
otherwise RFC3280-compliant GPKI issuer certificates with the directive SSLAllowNonCriticalBasicConstraints
.
To determine if SSLAllowNonCriticalBasicConstraints
is required for a specific server or client certificate,
inspect the fields in each Certificate Authority (including intermediates) and look for BOTH of the following
in the validation chain:
Example Configuration:
<VirtualHost *:443> SSLEnable SSLAllowNonCriticalBasicConstraints on </VirtualHost>
If an end-entity or issuer certificate is created with its beginning validity date in the future, it cannot be added to a KeyFile via ikeyman.
When the issuer or end-entity certificate becomes valid, IHS will not begin to use it until IHS has been restarted within the validity range.
On systems running inside of VMware, ikeyman and related tools can encounter a shortage of random data and appear to hang after many certificate operations.
Solution: Perform complicated key management tasks on a native platform or retry with the following VMware configuration option set to 'false'
monitor_control.virtual_rdtsc
LogLevel
to Debug
and
SSLTrace
in httpd.conf.