DLS_SSL_CertImportTool.bat 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. @echo off
  2. rem *********************************************************************************************************************************
  3. rem * Licensed Materials - Property of IBM *
  4. rem * *
  5. rem * IBM Cognos Products: DLS *
  6. rem * *
  7. rem * (C) Copyright IBM Corp. 2005, 2021 *
  8. rem * *
  9. rem * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *
  10. rem *********************************************************************************************************************************
  11. rem *************** DLS SSL certificate import tool *********************
  12. rem ** This tool is designed to import a SSL certificate in IBM Cognos Java Keystore
  13. rem **
  14. rem ********************************************************************
  15. rem NOTE:
  16. rem if successful this message will be shown: Certificate was added to keystore
  17. rem if already imported keytool error: java.lang.Exception: Certificate not imported, alias <DLSKeystore> already exists
  18. CLS
  19. if [%1]==[] goto usage
  20. cd ..\ibm-jre\jre\bin
  21. echo importing certificate from %1
  22. keytool -import -alias DLSKeystore -file %1 -keystore ..\lib\security\cacerts -storepass changeit -noprompt
  23. cd ..\..\..\bin
  24. echo Done.
  25. goto :eof
  26. :usage
  27. echo --------------------------------------------------------------
  28. echo Usage: %0 SSL_Certificate_PATH
  29. echo.
  30. echo e.g.
  31. echo.
  32. echo %0 C:\mailserver_ssl_keys\certificate.crt
  33. echo --------------------------------------------------------------
  34. exit /B 1