Mercurial > ~mikael > mcabber > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
1053:1ec7ec9bda60 | 1054:082d55152a25 |
---|---|
226 gpgme_key_release(key); | 226 gpgme_key_release(key); |
227 } | 227 } |
228 // r is a static variable, let's copy it. | 228 // r is a static variable, let's copy it. |
229 verified_key = g_strdup(r); | 229 verified_key = g_strdup(r); |
230 *sigsum = vr->signatures->summary; | 230 *sigsum = vr->signatures->summary; |
231 // For some reason summary could be 0 when status is 0 too, | |
232 // which means the signature is valid... | |
233 if (!*sigsum && !vr->signatures->status) | |
234 *sigsum = GPGME_SIGSUM_GREEN; | |
231 } | 235 } |
232 } | 236 } |
233 gpgme_data_release(data_text); | 237 gpgme_data_release(data_text); |
234 } | 238 } |
235 gpgme_data_release(data_sign); | 239 gpgme_data_release(data_sign); |