This module allows you to install certificates into the windows certificate manager.
salt '*' certutil.add_store salt://cert.cer 'TrustedPublisher'
Add the cert to the given Certificate Store
source (str) -- The source certificate file. This is either the path to a local file or
a file from the file server in the form of salt://path/to/file
store (str) -- The certificate store to add the certificate to
retcode (bool
, optional) -- If True
, return the retcode instead of stdout.
Default is False
.
saltenv (str
, optional) -- The salt environment to use. This is ignored if the path is local.
Default is base
.
CLI Example:
salt '*' certutil.add_store salt://cert.cer TrustedPublisher
salt '*' certutil.add_store C:\path\to\local.cer TrustedPublisher
Delete the cert from the given Certificate Store
source (str) -- The source certificate file. This is either the path to a local file or
a file from the file server in the form of salt://path/to/file
store (str) -- The certificate store to delete the certificate from
retcode (bool
, optional) -- If True
, return the retcode instead of stdout.
Default is False
saltenv (str
, optional) -- The salt environment to use. This is ignored if the path is local.
Default is base
.
CLI Example:
salt '*' certutil.del_store salt://cert.cer TrustedPublisher
salt '*' certutil.del_store 'C:\path\to\local.cer' TrustedPublisher
Get the serial number of a certificate file
The serial number of the certificate if found, otherwise None
.
CLI Example:
salt '*' certutil.get_cert_serial <certificate name>
Get all of the certificate serials in the specified store
The store to get all the certificate serials from
A list of serial numbers found, or an empty list if none found
CLI Example:
salt '*' certutil.get_stored_cert_serials <store>