Mercurial > hg
changeset 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 | 1ec7ec9bda60 |
children | 6eb1efea75d0 |
files | mcabber/src/pgp.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
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);