2.2.1 Importing Certificates to keystore

The following section details the steps to be followed to import certificates to keystore.
  1. The JKS(dls_cacerts) should be available under /WEB-INF/classes/config.
  2. Save all the certificates from the vendor website. Note to save the certificates in "Base-64 encoded X.509(.CER)" and with extn .cer. Steps for saving certificates from the vendor website:
  3. Run following command to import certificate into JKS(dls_cacerts)
    • "keytool -keystore <Key store Path> /dls_cacerts -import -trustcacerts -file <Certificate location in file system>\xxx.cer -alias <alias as mentioned in config file>
  4. Run following command to view details of certificate like expiration date of certificate etc.
    • "keytool -list -rfc -alias alias <alias as mentioned in config file> -keystore <Key store Path> /dls_cacerts
    • "keytool -list -v -alias alias <alias as mentioned in config file> -keystore <Key store Path> /dls_cacerts
    For more details on keytool refer the link: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/keytool.html