security:tldr:5ba16
The security set-identity-preference command is used to set the preferred digital identity (certificate) for a specific purpose on macOS.
Here is the breakdown of the command:
-
-s ${select}: The-sflag indicates the item to be set.${select}is a placeholder for the specific item being set. It could be a purpose like "ssl" or "codesigning", indicating the purpose for which the identity will be used. -
-c "${common_name}": The-cflag sets the common name for the identity.${common_name}is a placeholder for the actual common name of the identity. The common name is a human-readable name associated with the identity. -
${filename-keychain}: This specifies the filename of the keychain where the identity is located. The${filename-keychain}is a placeholder for the actual filename.
Overall, this command sets the preferred identity for a specific purpose by specifying the purpose, common name, and keychain filename.