Skip to main content

Persistent environment variables for Windows

Setting your DigiCert ONE host, API key, and client authentication certificate path and password as system variables, is a once off action. You will not be required to set your environment variables every time you open a command line session.

Set persistent environment variables

To set persistent variables:

  1. Search for environment variables in the Windows start menu.

  2. Select Edit for either system or user account environment variables.

  3. Select New.

  4. Add your non-sensitive data:

    Variable name

    Value

    SM_CLIENT_CERT_FILE

    DigiCert ONE Client authentication certificate path

    SM_HOST

    DigiCert ONE host

  5. You could set your sensitive credentials as persistent variables as shown below, however this is not recommended.

    Waarschuwing

    Storing your API key and client authentication certificate password as persistent environment variables is a security risk because anyone with access to your system can potentially perform actions using Software Trust Manager client tools. We strongly advise against this practice to protect your data and system integrity.

    Variable name

    Value

    SM_API_KEY

    DigiCert ONE API key

    SM_CLIENT_CERT_PASSWORD

    DigiCert ONE Client authentication certificate password

  6. Click on OK to close the dialog.

Set your API key and client authentication certificate password

Once your host and client authentication certificate path is securely stored as persistent environment variables, use the following method to set your API key and client authentication certificate password in SMCTL:

set SM_HOST=<host URL>
set SM_CLIENT_CERT_FILE=<P12 client authentication certificate file path>

Proxy configuration

If your client tool needs to communicate through a proxy, you can configure the HTTPS_PROXY environment variable accordingly. Choose the appropriate command based on your proxy type:

Anonymous proxy

Use this command if your proxy does not require authentication:

set HTTPS_PROXY=https://<proxy_host>:<proxy_port> 

Authenticated proxy

Use this command if your proxy requires authentication:

set HTTPS_PROXY=https://user:password@<proxy_host>:<proxy_port>

Remove persistent environment variables

Once your API key and client certificate password is securely stored in the properties file or Windows Credential Manager, ensure that your API key and client authentication certificate password is removed from persistent variables.

To remove persistent variables:

  1. Search for environment variables in the Windows start menu.

  2. Select Edit for either system or user account environment variables.

  3. Click on the SM_API_KEY variable.

  4. Click Delete.

  5. Click on the SM_CLIENT_CERT_PASSWORD variable.

  6. Click Delete.

  7. Click on OK to close the dialog.