SQ(1)

NAME
sq keyring lint - Command-line frontends for Sequoia

SYNOPSIS
sq [GLOBAL OPTIONS] keyring lint [OPTIONS] FILE

DESCRIPTION
Command-line frontends for Sequoia `sq keyring 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 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.

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.

EXIT STATUS:

If `--fix` is not specified:
  2 if any issues were found,
  1 if not 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 not issues were found, but there were errors reading the input,
  0 if all issues were fixed or there were no issues.

OPTIONS

  Global options

--cert-store=PATH
    Specifies the location of the certificate store

-f, --force=FORCE
    Overwrites existing files

--keyring=PATH
    Specifies the location of a keyring to use

--known-notation=NOTATION
    Adds NOTATION to the list of known notations

--no-cert-store=NO_CERT_STORE
    Disables the use of a certificate store

--output-format=FORMAT
    Produces output in FORMAT, if possible

--output-version=VERSION
    Produces output variant VERSION.

--pep-cert-store=PATH
    Specifies the location of a pEp certificate store

--time=TIME
    Sets the reference time as ISO 8601 formatted timestamp

--trust-root=FINGERPRINT|KEYID
    Considers the specified certificate to be a trust root

  Subcommand options

-B, --binary=BINARY
    Emits binary data

-e, --export-secret-keys=EXPORT_SECRET_KEYS
    When fixing a certificate, the fixed certificate is exported without any secret key material. Using this switch causes any secret key material to also be exported

-f, --fix=FIX
    Attempts to fix certificates, when possible

-k, --list-keys=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

-o, --output=FILE
    Writes to FILE or stdout if omitted

-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

-q, --quiet=QUIET
    Quiet; does not output any diagnostics

EXAMPLES

  # To gather statistics, simply run:

  $ sq keyring lint keyring.pgp

  # To fix a key:

  $ gpg --export-secret-keys FPR | sq keyring lint --fix -p passw0rd -p password123 | gpg --import

  # To get a list of keys with issues:

  $ sq keyring lint --list-keys keyring.pgp | while read FPR; do something; done

SEE ALSO
sq(1).

For the full documentation see <https://docs.sequoia-pgp.org/sq/>.

VERSION
0.31.0 (sequoia-openpgp 1.16.0, using Nettle 3.9 (Cv448: true))