Page MenuHome GnuPG

gpg2 exit code on G10ERR_NO_PUBKEY
Closed, ResolvedPublic


The gpg2 -d will fail with exit code 2 when the decrypted message contains a
signature that cannot be verified due to missing public key. It's questionable
whether the exit code shouldn't be rather 1 as the decryption succeeded and just
the signature verification failed. Evolution takes the exit code 2 as fatal
error and does not display the message at all.



Event Timeline

t8m added projects: gnupg, Bug Report.
t8m added a subscriber: t8m.
werner added a subscriber: werner.

It has been told for ages that the value of the exit code is not a reliable way
to get information from gpg. Use the --status-fd information.

werner claimed this task.