ctmkeytool

The ctmkeytool utility enables you to performs the following functions:

The ctmkeytool script is located in the following Control-M component directories, and must be run with its pathnameClosed The fully specified name of a computer file, including the position of the file in the file system directory structure.:

  • Control-M/EM: <Control-M/EM_Home>/bin/

  • Control-M/Server: <Control-M/Server_Home>/scripts/

  • Agent: <Agent_Home>/exe/

  • You must run this script with its pathname.

  • You cannot run this script on Control-M/Agent on IBM i (AS/400).

  • (UNIX only) On Control-M/EM, you must run this script in the Control-M/EM shell, such as em tcsh.

Creating a Private Key and Certificate Signing Request

This procedure describes how to creates a private key file and certificate signing request (CSR) file, according to the csr_params.cfg configuration file that is located in the <Product Home Directory>/data/SSL/config directory. The csr_params.cfg file is a standard OpenSSL configuration file. If you have any requirements from the certificate, you can include them in this file. For more information, see https://www.openssl.org.

Before You Begin

Begin

  1. Navigate to one of the following folders, according to the required component:

    • Control-M/EM: <Control-M/EM_Home>/bin/

    • Control-M/Server: <Control-M/Server_Home>/scripts/

    • Control-M/Agent: <Agent_Home>/exe/

  2. Do one of the following to create the private key and CSR files, according to the required filename:

    • Accept Default Filenames: Run the following command:

      • UNIX: <ctmkeytool_Directory>\ctmkeytool -create_csr -password <Private_Key_Password>

      • Windows: <ctmkeytool_Directory>\ctmkeytool -create_csr -password <Private_Key_Password>

      The script creates the files with filenames that contain the CN field that is recorded in the csr_params.cfg configuration file and creation time timestamps. They are saved in the following directories:

    • Define Filenames: Run the following command to define the same filename for the private key and CSR file:

      • UNIX: <ctmkeytool_Directory>\ctmkeytool -create_csr -password <Private_Key_Password> -out <Filename>

      • Windows: <ctmkeytool_Directory>\ctmkeytool -create_csr -password <Private_Key_Password> -out <Filename>

      /home/smartool/ctm_em/bin/ctmkeytool -create_csr -password ChangeThisPassword -out 2026_SSL_Key

    The private key (extension .pem) and CSR (extension .csr) files are saved in the following directories:

    • Private Key File

      • UNIX: <Control-M_Component_Home>/data/SSL/private_keys

      • WIndows: <Control-M_Component_Home>\data\SSL\private_keys

    • CSR File

      • UNIX: <Control-M_Component_Home>/data/SSL/certificate_requests directory

      • Windows: <Control-M_Component_Home>\Data\SSL\certificate_requests directory

    • The first time you run the ctmkeytool -create_csr script, it automatically updates the :FQDN: and :ShortHostName: placeholders with your host FQDN and hostname in your csr_params.cfg file, which enables the generated signed certificate to support HTTPS connections.

    • To reference a different csr_params.cfg configuration file, run the script with the -conf_file flag, as follows:

      <ctmkeytool_Directory>/ctmkeytool -create_csr -password <private key password> -conf_file <Product_Home_Directory>/config_files/csr_config_file.cfg

    • To use a certificate authentication elliptic curve cipher, generate a private key using an elliptic curve cipher, by adding -algorithm ec. There are two valid values for the algorithm name, rsa and ec. If -algorithm is not defined, the RSA algorithm is used.

    • You can also define -ec_curve <curve name>. Valid values for a curve name are all NIST convention names, and the curve names appear when you run the command one or more of the following commands:

      • Control-M/EM: <Control-M/EM_Home>/bin/openssl ecparam -list_curves

      • Control-M/Server: <Control-M/Server_Home>/exe/openssl ecparam -list_curves

      • Control-M/Agent: <Agent_Home>/exe/openssl ecparam -list_curves

      The default curve is P-256.

Begin

  1. Run one of following commands to update the required Control-M component:

  2. Restart the relevant components, as follows:

    • Control-M/Server: Control-M/Server and the Control-M/Server Configuration Agent

    • Agent: Specific Agents

Status Option

The ctmkeytool -status option tests and receives details about the SSL environment on Control-M/EM and its SSL connection to a specific Control-M/Server.

You can run the ctmkeytool -status option as follows:

<EM_Home_Directory>/bin/ctmkeytool -status -host <Control-M/Server_Name_as_It_Appears_in_CCM> -keystore_pass <Local_Keystore_Password_on_Control-M/EM> -key_pass <Private_Key_Password_in_the_Keystore>

The output that appears includes the following details:

  • SSL configuration enablement status.

  • Connection status between the selected Gateway and Control-M/Server. If the connection is not OK, you are prompted for further testing.

  • Control-M/Server ports that the Gateway and CMS connect to.

  • Filename that holds the keystore that the Control-M/EM Gateways and CMS use.

  • SSL protocols that the Control-M/EM Gateways and CMS use.

  • SSL level that the Control-M/EM Gateways and CMS use.

Uninstall Option

The ctmkeytool -uninstall option enables you to revert to the last SSL certificate and configuration that the product used before the current keystore was deployed. You can only revert to the immediately previous configuration. Older configurations cannot be retrieved.

You can retrieve the previous configuration on Control-M/EM, Control-M/Server, and the Agent.

You can run the ctmkeytool -uninstall option as follows:

<ctmkeytool directory>/ctmkeytool -uninstall

After you run the script, you must restart the following relevant components:

  • Control-M/EM: Control-M/EM Configuration Agent, CMS, and the relevant Gateways

  • Control-M/Server: Control-M/Server and Control-M/Server Configuration Agent

  • Control-M/Agent: Specific Agents