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:
Search for environment variables in the Windows start menu.
Select Edit for either system or user account environment variables.
Select New.
Add your non-sensitive data:
Variable name
Value
SM_CLIENT_CERT_FILE
SM_HOST
You could set your sensitive credentials as persistent variables as shown below, however this is not recommended.
警告
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
SM_CLIENT_CERT_PASSWORD
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:
Search for environment variables in the Windows start menu.
Select Edit for either system or user account environment variables.
Click on the SM_API_KEY variable.
Click Delete.
Click on the SM_CLIENT_CERT_PASSWORD variable.
Click Delete.
Click on OK to close the dialog.