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.
--- 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);