Import a certificate into the Data Collector Java keystore
Use the following steps to add an SSL certificate to the Java keystore for a Data Collector. Some servers, such as vSphere, require a certificate for connection while communicating with SSL.
See Configure the Data Collector to trust the certificate.
See Keystore file locations on the Data Collector server.
Copy the certificate file (server.crt file) to the Data Collector.
If you are not running the Data Collector installer from the default collector location for an upgrade (
/opt/aptareorC:\Program Files\Aptare) or for a fresh installation (/usr/openv/analyticscollector/orC:\Program Files\Veritas\AnalyticsCollector), substitute the appropriate path for <APTARE_HOME> in the command path in the following commands:Linux:
<APTARE_HOME>/java/bin/keytool -importcert -alias "somealias" -file server.crt -keystore <APTARE_HOME>/java/lib/security/cacerts <APTARE_HOME>/java/bin/keytool -import -alias "somealias" -file server.crt -keystore <APTARE_HOME>/upgrade/upgradeManager/jre/lib/security/cacerts
Windows:
"<APTARE_HOME>\java\bin\keytool" -importcert -alias "somealias" -file server.crt -keystore "<APTARE_HOME>\java\lib\security\cacerts" "<APTARE_HOME>\java\bin\keytool" -import -alias "somealias" -file server.crt -keystore "<APTARE_HOME>\upgrade\upgradeManager\jre\lib\security\cacerts"
When prompted, enter the default password to the keystore:
changeit
The results will be similar to the following example:
Enter keystore password: ...... Certificate Shown here ...... Trust this certificate? [no]: yes
Once completed, run the following keytool command to view a list of certificates from the keystore and confirm that the certificate was successfully added. The certificate fingerprint line displays with the alias name used during the import.
Linux:
<APTARE_HOME>/java/bin/keytool -list -keystore <APTARE_HOME>/java/lib/security/cacerts
Windows:
"<APTARE_HOME>\java\bin\keytool" -list -keystore "<APTARE_HOME>\java\lib\security\cacerts"
Sample Linux Output
Enter keystore password: Keystore type: JKS Keystore provider: SUN Your keystore contains 79 entries digicertassuredidrootca, Apr 16, 2008, trustedCertEntry, Certificate fingerprint (SHA1): 05:63:B8:63:0D:62:D7:5A:BB:C8:AB:1E:4B:DF:B5:A8:99:B2:4D:43 trustcenterclass2caii, Apr 29, 2008, trustedCertEntry, Certificate fingerprint (SHA1): AE:50:83:ED:7C:F4:5C:BC:8F:61:C6:21:FE:68:5D:79:42:21:15:6E .....