Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/jabglue.c @ 1046:a3748bd3d010
Tell the user when a signature is bad
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 26 Nov 2006 18:40:05 +0100 |
parents | 96be69d3a5fd |
children | ea71d31a2607 |
comparison
equal
deleted
inserted
replaced
1045:96be69d3a5fd | 1046:a3748bd3d010 |
---|---|
1466 key = gpg_verify(p, text, &sigsum); | 1466 key = gpg_verify(p, text, &sigsum); |
1467 if (key) { | 1467 if (key) { |
1468 g_free(res_pgpdata->sign_keyid); | 1468 g_free(res_pgpdata->sign_keyid); |
1469 res_pgpdata->sign_keyid = key; | 1469 res_pgpdata->sign_keyid = key; |
1470 res_pgpdata->last_sigsum = sigsum; | 1470 res_pgpdata->last_sigsum = sigsum; |
1471 if (sigsum & GPGME_SIGSUM_RED) { | |
1472 char *buf = g_strdup_printf("Bad signature from <%s/%s>", barejid, rname); | |
1473 scr_WriteIncomingMessage(barejid, buf, 0, HBB_PREFIX_INFO); | |
1474 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); | |
1475 g_free(buf); | |
1476 } | |
1471 } | 1477 } |
1472 #endif | 1478 #endif |
1473 } | 1479 } |
1474 | 1480 |
1475 static void gotmessage(char *type, const char *from, const char *body, | 1481 static void gotmessage(char *type, const char *from, const char *body, |