List Valid Code-Signing Identities with security find-identity
Show every valid signing certificate + private key pair your keychain can offer to codesign.
01Command
$ security find-identity -v -p codesigning02What it does
An identity is a certificate together with its private key; a certificate without the key does not appear in this list. The -p codesigning policy filter keeps only identities usable for code signing and -v hides invalid/expired ones, which is exactly what xcodebuild and codesign look for. The leading hash is what you pass to codesign -s <hash>.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- security - Administer Keychains, Keys, CertificatesEvidence: Documents the find-identity subcommand — find an identity (certificate + private key) — among the security tool's operations.
- security(1) man pageEvidence: The security man page details find-identity options: -p to specify the policy (e.g. codesigning) and -v to show only valid identities.
Last verified: 2026-09-19 · Category: Security & Privacy
06Related solutions
Check whether an application bundle was signed properly and hasn't been modified since.
Build an AES-256 encrypted .dmg vault from the Terminal — no Disk Utility clicking required.
Inspect the certificate chain of a macOS package file before you install anything from it.