#!/bin/sh # ********************************************************************************************************************************* # * Licensed Materials - Property of IBM * # * IBM Cognos Products: DLS * # * (C) Copyright IBM Corp. 2005, 2021 * # * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. * # ********************************************************************************************************************************* # *************** DLS SSL certificate import tool ********************* # ** This tool is designed to import a SSL certificate in IBM Cognos Java Keystore # ******************************************************************** # NOTE: # if successful this message will be shown: Certificate was added to keystore # if already imported keytool error: java.lang.Exception: Certificate not imported, alias already exists if [[ -z "$1" ]]; then echo -------------------------------------------------------------- echo Usage: $0 SSL_Certificate_PATH echo. echo e.g. echo. echo $0 /mailserver_ssl_keys/certificate.crt echo -------------------------------------------------------------- exit 1 fi cd ../ibm-jre/jre/bin echo importing certificate from $1 keytool -import -alias DLSKeystore -file $1 -keystore ../lib/security/cacerts -storepass changeit -noprompt cd ../../../bin echo Done. exit 1