# HG changeset patch # User Mikael Berthe # Date 1164660026 -3600 # Node ID 082d55152a258a739a637d8780c1919562309e79 # Parent 1ec7ec9bda60598d1d5e19b5290cbd0b98e80764 PGP: Improve pgp_verify() Sometimes the summary is 0 and the status is 0. According to the gpgme reference manual, status=0 means the signature is valid. diff -r 1ec7ec9bda60 -r 082d55152a25 mcabber/src/pgp.c --- a/mcabber/src/pgp.c Mon Nov 27 20:55:33 2006 +0100 +++ b/mcabber/src/pgp.c Mon Nov 27 21:40:26 2006 +0100 @@ -228,6 +228,10 @@ // r is a static variable, let's copy it. verified_key = g_strdup(r); *sigsum = vr->signatures->summary; + // For some reason summary could be 0 when status is 0 too, + // which means the signature is valid... + if (!*sigsum && !vr->signatures->status) + *sigsum = GPGME_SIGSUM_GREEN; } } gpgme_data_release(data_text);