macOS

security

CautionKeychain from the CLI

security find-certificate -a -c <name>

Queries keychain certs and secrets — audit certificate expiry or fetch credentials safely in scripts.

Examples

  • security find-certificate -a -c corp -p | openssl x509 -noout -enddateCheck a cert's expiry

Syntax

security find-certificate|find-generic-password|add-trusted-cert ...

Before you run it

Revealed secrets linger in logs.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store