diff mcabber/src/pgp.c @ 1054:082d55152a25

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.
author Mikael Berthe <mikael@lilotux.net>
date Mon, 27 Nov 2006 21:40:26 +0100
parents ad5de4d1ee56
children 4cdf19d9c74e
line wrap: on
line diff
--- 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);