On 8/7/26 12:46, Gunnar Wolf wrote:
Gunnar Wolf dijo [Fri, Aug 07, 2026 at 09:37:25AM -0600]:
I think the following does the trick:
$ KEYID=0x2404C9546E145360 # Naturally, replace for your own
$ TMPDIR=$(mktemp -d)
$ sq network keyserver search $KEYID --server hkps://
keyring.debian.org --cert-store $TMPDIR --quiet
$ sq cert list $KEYID --cert-store $TMPDIR
That doesn’t display the subkeys (nor their expirations) to me. The
following worked for me.
$ sq key list $KEYID --cert-store $TMPDIR
$ rm -rf $TMPDIR
Expired keys will output a “Warning: ($keyid) is unusable: No binding
signature at time ($curr_time), because Policy rejected non-revocation
signature” to STDERR.
Of course, you could beautify this, but just for checking you key's
status
in the keyring, it should do the trick 🙃
And if you happen to prefer gpg's incantations, an equivalent would be:
$ KEYID=0x2404C9546E145360 # Naturally, replace for your own
$ TMPDIR=$(mktemp -d)
$ gpg --homedir $TMPDIR --keyserver hkps://keyring.debian.org --
recv-keys $KEYID
$ gpg --list-key $KEYID
I *think* that displays what is in my current ~/.gnupg/ directory, and
that you rather wanted to share the following command.
$ gpg --homedir $TMPDIR --list-key $KEYID
$ rm -rf $TMPDIR
A valid key will output the available subkeys as usual, an expired key will
give a somewhat cryptic “gpg: error reading key: No public key” message.
Regards,
taffit