SQ(1)

πŸ’– SQ(1) β€” the sq-cert glow-up πŸ’–

okay bestie, welcome to sq-cert, aka the manual page for managing certificates πŸŽ€ (the man page header literally says SQ(1) and the whole vibe is "User Commands", so yeah, we're in the right place ✨)


✨ NAME ✨

sq-cert β€” manage certificates πŸ’…


🌸 SYNOPSIS 🌸

sq cert import [OPTIONS] FILE
sq cert export [OPTIONS]
sq cert list [OPTIONS] FINGERPRINT|KEYID|PATTERN
sq cert lint [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

Manage certificates, bestie. That's the whole thing. πŸ’–

quick vocab check because this matters: when we say "certificate", or "cert" for short, we mean OpenPGP keys that do NOT contain secrets 🫢. This subcommand gives you the primitives to generate certs and otherwise manipulate them. iconic.

flip side: we use "key" to mean OpenPGP keys that DO contain secrets πŸ‘€. See sq key for operations on keys. iykyk.


🌈 SUBCOMMANDS 🌈

πŸŽ€ sq cert import

Import certificates into the local certificate store. slay, that's it, that's the job.

πŸ’œ sq cert export

Export certificates from the local certificate store.

if multiple predicates are specified, a certificate is returned if at least one of them matches. (not all, bestie β€” at least one 🫢)

⚠️ heads up: this does NOT check the authenticity of the certificates in any way. before you use those certificates, be sure to validate and authenticate them. no cap, do not skip that step 😭

when matching on subkeys or User IDs, the component has to have a valid self signature according to the policy. rules are rules πŸ’…

it fails if search criteria are specified and none of them matches any certificates. note: this means if the certificate store is empty and no search criteria are specified, then this will return success ✨ (yes literally, empty store + no criteria = success, that's not a typo)

🧚 sq cert list

List certificates and user IDs.

it lists certificates and user IDs that match a query, are usable, and can be authenticated 🌸. by default, bindings (that's certificate + user ID pairs) must be fully authenticated. if no certificates or bindings match a query, then the command returns a non-zero exit code πŸ™ˆ

if no queries are provided, then all bindings that are usable and can be authenticated are listed. if there are no such bindings, the command still succeeds β€” no drama πŸ’œ

by default, unusable certificates are skipped, i.e. those that are not valid according to the policy, are revoked, or are not live 🚫. likewise, user ID self signatures and certifications that are not valid according to the policy are skipped, and user IDs that are revoked are skipped too. vibe check failed = not invited ✨

⭐ sq cert lint

Check certificates for issues. the maintenance-bae of the group chat 🧼

sq cert lint checks the supplied certificates for the following SHA-1-related issues:

  • Whether a certificate revocation uses SHA-1.
  • Whether the current self signature for a non-revoked User ID uses SHA-1.
  • Whether the current subkey binding signature for a non-revoked, live subkey uses SHA-1.
  • Whether a primary key binding signature ("backsig") for a non-revoked, live subkey uses SHA-1.

diagnostics get printed to stderr. at the end, some statistics are shown πŸ“Š β€” this is useful when examining a keyring. if --fix is specified and at least one issue could be fixed, the fixed certificates are printed to stdout πŸ’…

😭 real talk: this tool does not currently support smart cards. BUT β€” if only the subkeys are on a smart card, this tool may still be able to partially repair the certificate. specifically, it will be able to fix any issues with User ID self signatures and subkey binding signatures for encryption-capable subkeys, but it will not be able to generate new primary key binding signatures for any signing-capable subkeys. partial slay, not full slay 🫢

πŸ’« EXAMPLES πŸ’«

πŸ“ sq cert import

Import a certificate.

sq cert import juliet.pgp

πŸ“ sq cert export

Export certificates with a User ID containing the email address.

sq cert export --cert-email=alice@example.org

Export certificates that contain a User ID with either (not both!) email address.

sq cert export --cert-email=alice@example.org \
       --cert-email=bob@example.org

Export all certificates.

sq cert export --all

πŸ“ sq cert list

List all bindings for user IDs containing an email address from example.org, and that can be authenticated.

sq cert list @example.org

List all authenticated bindings for User IDs containing a specific email address.

sq cert list --cert-email=alice@example.org

List all paths to certificates containing a specific email address.

sq cert list --gossip --show-paths \
       --cert-email=alice@example.org

πŸ“ sq cert lint

Gather statistics on the certificates in a keyring.

sq cert lint --cert-file certs.pgp

Fix a key with known problems.

sq cert lint --fix --cert \
       EB28F26E2739A4870ECC47726F0073F60FD0CBF0

πŸ”₯ SEE ALSO πŸ”₯

sq(1), sq-cert-import(1), sq-cert-export(1), sq-cert-list(1), sq-cert-lint(1).

for the full documentation see <https://book.sequoia-pgp.org/>. go read it bestie, it's giving ✨knowledge✨


πŸ‘‘ VERSION πŸ‘‘

1.5.0


and that's the whole page, bestie 🫢 this was brought to you by Sequoia PGP, version 1.5.0 β€” that's the source and the version right there at the bottom, so if anyone asks where you got your cert-management lore, you cite Sequoia PGP 1.5.0. periodt πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from