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
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
The certificate store to add the certificate to
If True, return the retcode instead of stdout. Default is False
The salt environment to use. This is ignored if the path is local
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
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
The certificate store to delete the certificate from
If True, return the retcode instead of stdout. Default is False
The salt environment to use. This is ignored if the path is local
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 certificate file to find the serial for. Can be a local file or a
a file on the file server (salt://)
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>