Install certificates into the keychain on Mac OS
New in version 2016.3.0.
Get the default keychain
CLI Example:
salt '*' keychain.get_default_keychain
Get the friendly name of the given certificate
The password for the certificate being installed formatted in the way described for openssl command in the PASS PHRASE ARGUMENTS section
Note: The password given here will show up as plaintext in the returned job info.
CLI Example:
salt '*' keychain.get_friendly_name /tmp/test.p12 test123
Returns the hash of a certificate in the keychain.
CLI Example:
salt '*' keychain.get_hash /tmp/test.p12 test123
Install a certificate
The password for the certificate being installed formatted in the way described for openssl command in the PASS PHRASE ARGUMENTS section.
Note: The password given here will show up as plaintext in the job returned info.
If your keychain is likely to be locked pass the password and it will be unlocked before running the import
Note: The password given here will show up as plaintext in the returned job info.
CLI Example:
salt '*' keychain.install test.p12 test123
List all of the installed certificates
CLI Example:
salt '*' keychain.list_certs
Set the default keychain
CLI Example:
salt '*' keychain.set_keychain /Users/fred/Library/Keychains/login.keychain
Uninstall a certificate from a keychain
If your keychain is likely to be locked pass the password and it will be unlocked before running the import
Note: The password given here will show up as plaintext in the returned job info.
CLI Example:
salt '*' keychain.install test.p12 test123
Unlock the given keychain with the password
The password to use to unlock the keychain.
Note: The password given here will show up as plaintext in the returned job info.
CLI Example:
salt '*' keychain.unlock_keychain /tmp/test.p12 test123
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.mac_keychain.html