SEQUOIA-KEYRING-LINTER(1)

πŸ“¦
version 1.0.1 Β· 4 versions
, in ubuntu noble

✨ SEQUOIA-KEYRING-LINTER ✨

okay bestie, gather round, because this is the sequoia-keyring-linter manual page, and it lives in section 1 (User Commands). she's a lil tool called sq-keyring-linter and she is so good at sniffing out bad vibes in your OpenPGP keyrings. no cap. πŸ’–


🌸 NAME 🌸

sequoia-keyring-linter β€” aka sq-keyring-linter. a linter for keyrings, literally that's the whole job description. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

sq-keyring-linter [OPTIONS] [FILE]...

πŸŽ€ DESCRIPTION πŸŽ€

A linter for keyrings. yes bestie, that's it, that's the whole thing, and honestly? iconic. πŸ‘‘

Arguments

  • [FILE]... β€” a list of OpenPGP keyrings to process. if you don't specify any, then the keyring gets read from stdin. so you can absolutely just pipe stuff in, no pressure. πŸ™ˆ

πŸ’– OPTIONS πŸ’–

  • -t, --time <TIME> β€” sets the reference time to TIME.

TIME is interpreted as an ISO 8601 timestamp. so if you wanna set the reference time to July 21, 2013 at midnight UTC, you go:

$ sq-keyring-linter --time 20130721 ...

and if you want to include an actual time, add a T, then the time, and optionally the timezone (default timezone is UTC, because of course it is πŸ’…):

$ sq-keyring-linter --time 20130721T0550+0200 ...
  • -q, --quiet β€” quiet mode. does not output any diagnostics. she's giving silence, she's giving peace. 🀫
  • -f, --fix β€” attempts to fix certificates, when possible. little miss fix-it. πŸ› οΈ
  • -e, --export-secret-keys β€” when fixing a certificate, the fixed certificate is exported without any secret key material by default. using this switch causes any secret key material to also be exported. so like, only flip this if you want the secret stuff coming along for the ride. πŸ”₯
  • -p, --password <PASSWORD> β€” a key's password. normally this is not needed: if stdin is connected to a tty, the linter will ask for a password when needed. so it's polite like that. πŸ₯°
  • -k, --list-keys β€” if set, outputs a list of fingerprints, one per line, of certificates that have issues. this output is intended for use by scripts, so it's the ✨machine-readable✨ bestie.

this option implies --quiet. if you also specify --fix, errors will still be printed to stderr, and fixed certificates will still be emitted to stdout. noted, no cap.

  • -h, --help β€” print help information (use -h for a summary). the lil recap version. 🫢
  • -V, --version β€” print version information. show her some love. 🌈

sq-keyring-linter checks the supplied certificates for the following SHA-1-related issues, and honestly SHA-1 is giving expired milk at this point:

  • 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 are 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. cute lil before/after moment. ✨

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. in particular, 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. so like, partial slay, not a full slay. πŸ’€

⭐ EXIT STATUS ⭐

If --fix is not specified:

  • 2 β€” if any issues were found.
  • 1 β€” if no issues were found, but there were errors reading the input.
  • 0 β€” if there were no issues.

If --fix is specified:

  • 3 β€” if any issues could not be fixed.
  • 1 β€” if no issues were found, but there were errors reading the input.
  • 0 β€” if all issues were fixed or there were no issues.

πŸ’œ EXAMPLES πŸ’œ

# To gather statistics, simply run: $ sq-keyring-linter
keyring.pgp

# To fix a key: $ gpg --export-secret-keys FPR |
sq-keyring-linter --fix -p passw0rd -p password123 | gpg --import

# To get a list of keys with issues: $ sq-keyring-linter
--list-keys keyring.pgp | while read FPR; do something; done

πŸ” SEE ALSO πŸ”

sq-keyring-linter's homepage:

<https://gitlab.com/sequoia-pgp/keyring-linter>


and that's the whole page, bestie!! πŸŽ€βœ¨πŸ’–

this was sequoia-keyring-linter version 1.0.0, from February 2023. go forth and lint those keyrings, you absolute main character. πŸ‘‘πŸ¦‹πŸ’… no cap, fr fr.

πŸ“¦ where this page comes from