IBM Support

Import of certificate for TLS connection failed with "Input not an X.509 certificate"

Troubleshooting


Problem

In step 1 of probe for email document for TLS connection
https://www.ibm.com/support/knowledgecenter/SSSHTQ/omnibus/probes/email/wip/reference/email_keystore_file.html
the command
keytool -import -alias client_certificate -file certificate_file -keystore keystore_name
give error of "java.lang.Exception: Input not an X.509 certificate"

Cause

A wrong certificate type was used.
A version of .cer certificate is expected. Using a certificate of .p7b will give the error.

Diagnosing The Problem

Check to make sure the certificate used is of .cer type.

Resolving The Problem

Convert the .p7b certificate file to x.509 (.cer) certificate file using Microsoft Windows
  1. Copy the  .p7b certificate file to a Windows desktop
  2. Rename the PKCS 7 certificate and give it a .p7b extension if need to.
  3. Open the .p7b file
  4. Click the plus ( + ) symbol
  5. Click the Certificates directory
  6. Right click on your certificate file
  7. Select All Tasks > Export
  8. Click Next
  9. Select Base-64 encoded X.509 (.cer) > Click Next
  10. Browse to a location to store the file
  11. Enter a File name. For example MyCert. The .cer extension is added automatically
  12. Click Save
  13. Click Next
  14. Click Finish
Alternatively use openssl
openssl pkcs7 -print_certs -in certificatename.p7b -out certificatename.cer
Used the converted .cer certificate to import into your keystore.

Document Location

Worldwide

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSSHTQ","label":"Tivoli Netcool\/OMNIbus"},"Component":"Probe for Email","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

TS002639718

Product Synonym

email probe

Document Information

Modified date:
11 September 2019

UID

ibm11073494