Adding SSL Certificates
Overview
ServiceNow MID Servers rely on a private Java Runtime Environment (JRE) to handle outbound HTTPS connections. Unlike web browsers, this environment does not automatically inherit trusted certificates from the host OS (Windows/Linux).
This guide covers the process of manually trusting a Certificate Authority (CA) to resolve handshake failures in integrations, Discovery, or Service Mapping.
Common Use Cases
- Integration Failures: REST/SOAP messages returning Response Code: -1 or Untrusted Certificate.
- Discovery Issues: Failure to connect to vCenter, cloud endpoints, or internal management consoles.
- Certificate Rotation: A service updated its certificate, but the MID Server lacks the new Intermediate or Root CA.
Prerequisites
- Administrative rights on the host
- The CA certificate file (usually
.crt,.cer,.pem) - Identification of the MID Server’s folder containing the JRE Keytool (eg., C:\ServiceNow\MID_Prod\agent\jre\bin)
- Identification of the MID Server’s JRE cacerts file (eg., C:\ServiceNow\MID_Prod\agent\jre\lib\security\cacerts)
- Knowledge of the keystore password (default is
changeit)
Procedure
Open Command Prompt or Terminal as Administrator/root.
Navigate to the JRE bin directory of the MID Server:
cd C:\ServiceNow\MID_Prod\agent\jre\binRun the keytool command to import the CA certificate
keytool -import -alias my_new_ca -file "C:\temp\ca_cert.cer" -keystore "..\lib\security\cacerts"When prompted, enter the keystore password (default is
changeit).When prompted, type
yesto trust the certificate.
Verification
You can verify the certificate was added successfully by listing the contents of the keystore:
keytool.exe -list -keystore "..\lib\security\cacerts" -storepass changeit