Clarification on getting a validity reason in GPGME

John Scott jscott at
Sun Nov 8 02:27:57 CET 2020


I'm writing a tool using GPGSM and want to print signature validation 
information without reinventing the wheel with case statements, also for the 
sake of localization. These members in gpgme_signature_t [1] seem to be what 
I'm looking for:

gpgme_validity_t validity
	The validity of the signature.
gpgme_error_t validity_reason
	If a signature is not valid, this provides a reason why.

so I can get a string from the gpgme_error_t, although it appears to be 
conditional on the signature being invalid. That's not clear since 
gpgme_validity_t is an enumeration of

I wonder if this is the case already and it's just a documentation quirk, but 
it'd be helpful if validity_reason were set to some value for good signatures, 
although this isn't technically an error.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the Gnupg-users mailing list