comparison mcabber/src/jabglue.c @ 1052:c8a8edd5c50d

PGP: Sign empty <status/> presence elements See <http://mailman.jabber.org/pipermail/standards-jig/2006-November/013226.html>
author Mikael Berthe <mikael@lilotux.net>
date Mon, 27 Nov 2006 20:08:32 +0100
parents ea71d31a2607
children 1ec7ec9bda60
comparison
equal deleted inserted replaced
1051:9d604589d41d 1052:c8a8edd5c50d
432 // in order to avoid some problems during network failures) 432 // in order to avoid some problems during network failures)
433 if (online) { 433 if (online) {
434 const char *s_msg = (st != invisible ? msg : NULL); 434 const char *s_msg = (st != invisible ? msg : NULL);
435 x = presnew(st, recipient, s_msg); 435 x = presnew(st, recipient, s_msg);
436 #ifdef HAVE_GPGME 436 #ifdef HAVE_GPGME
437 if (!do_not_sign && s_msg && *s_msg && gpg_enabled()) { 437 if (!do_not_sign && gpg_enabled()) {
438 char *signature = gpg_sign(s_msg); 438 char *signature;
439 signature = gpg_sign(s_msg ? s_msg : "");
439 if (signature) { 440 if (signature) {
440 xmlnode y; 441 xmlnode y;
441 y = xmlnode_insert_tag(x, "x"); 442 y = xmlnode_insert_tag(x, "x");
442 xmlnode_put_attrib(y, "xmlns", NS_SIGNED); 443 xmlnode_put_attrib(y, "xmlns", NS_SIGNED);
443 xmlnode_insert_cdata(y, signature, (unsigned) -1); 444 xmlnode_insert_cdata(y, signature, (unsigned) -1);