GNOME Bugzilla – Bug 766811
RFE: make GPG error messages more user-friendly
Last modified: 2021-05-19 11:03:23 UTC
[In the following GPG means both gpg and gpg2] Currently when GPG throws an error while encrypting and/or signing a message, Evolution simply copies the diagnostic output directly to the user. This is often not easily understandable and is frequently badly-formatted. For example the common case of a missing public key generates several lines of mysterious output which has to be closely read to see what the problem is. One difficulty in improving this is that the text output from GPG is quite unstructured and may possibly change across versions. An alternative would be to use the GPG --status-fd option, which has a more structured and well-documented format, and parse the result to produce a user-friendly error message. See also https://bugzilla.gnome.org/show_bug.cgi?id=586746
Camel's gpg code already uses --status-fd afaik. At least, I know I used --status-fd when I originally wrote the code. You can't really get good error strings from that, though. A better suggestion would be to use GPGME.
GMime's GPGME logic can be found in https://github.com/jstedfast/gmime/blob/master/gmime/gmime-gpgme-utils.c And the code that uses it is: https://github.com/jstedfast/gmime/blob/master/gmime/gmime-gpg-context.c (which is effectively aka camel-gpg-context.c)
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/ Thank you for your understanding and your help.