After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766811 - RFE: make GPG error messages more user-friendly
RFE: make GPG error messages more user-friendly
Status: RESOLVED OBSOLETE
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.18.x (obsolete)
Other Linux
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2016-05-23 16:09 UTC by Patrick OCallaghan
Modified: 2021-05-19 11:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Patrick OCallaghan 2016-05-23 16:09:39 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
Comment 1 Jeffrey Stedfast 2018-11-25 04:29:15 UTC
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.
Comment 2 Jeffrey Stedfast 2018-11-26 14:20:28 UTC
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)
Comment 3 André Klapper 2021-05-19 11:03:23 UTC
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.