gpg does not emit creation time of bad signatures
Testing, NormalPublic

Assigned To
None
Authored By
ikloecker
Thu, Jul 23, 10:00 AM

Description

In Kleopatra we wanted to print the creation time also for bad signatures (see T7786: Kleopatra: improvements of signature verification result messages), but gpg/gpgsm only emit the creation time of a signature with VALIDSIG and with ERRSIG.

gpg does print the creation time also for bad signatures:

gpg: Signature made Mi 22 Jul 2026 16:33:47 CEST
gpg:                using EDDSA key 117C22E18017CB18A67FC3D699954415471E4A5F
gpg: BAD signature from "Second UID <uid_b@example.net>" [ultimate]

Event Timeline

I tested with GnuPG master (2.5.21) and 2-2-branch (2.2.54).
gpgsm prints the signature time also for bad signatures:

$ gpgsm --verify test.txt.p7s test.txt
gpgsm: Signature made 2026-07-28 07:07:06 UTC
gpgsm:                using rsa3072 key 08707A434BCB4935A57A1997C9FFC4B265FC73C6
gpgsm: invalid signature: Bad signature

Well, I think that Ingo wants a status output so that gpgme can get this information.

Yes, sorry. I guess I should have also mentioned the status lines that gpg emits.

[GNUPG:] NEWSIG
gpg: Signature made Mi 22 Jul 2026 16:33:47 CEST
gpg:                using EDDSA key 117C22E18017CB18A67FC3D699954415471E4A5F
[GNUPG:] KEY_CONSIDERED 117C22E18017CB18A67FC3D699954415471E4A5F 0
[GNUPG:] BADSIG 99954415471E4A5F Second UID <uid_b@example.net>
gpg: BAD signature from "Second UID <uid_b@example.net>" [ultimate]
[GNUPG:] FAILURE gpg-exit 33554433

-> BADSIG only mentions the key ID and the user ID.

Unfortunately, we cannot simply add the timestamp to BADSIG because user IDs don't have a specific format.

pl13 changed the task status from Open to Testing.Thu, Jul 30, 11:56 AM