Re: Mails not signed when using secondary identity



Hi all:

Am 21.02.06 15:57 schrieb(en) Mişu Moldovan:
Sometimes I send mail with my secondary identity and I want all/most of them to be GPG-signed. I was able to send signed mails using this secondary identity for some time, but for some reason it stopped working some days ago.

Attached to this message is a patch for this problem. Is is caused by a missing direct assignment of the respective flags when the identity changes. IIRC, with earlier versions of gtk the callback function for gtk_check_menu_item_set_active() was also called if the actual setting of the item did /not/ change. It looks as if recent gtk versions added some (reasonable) optimisation at this point.

IMHO this bug should be considered as a *critical security problem*, because users will rely on balsa automatically signing/encrypting messages even if the identity is changed.

Thanks a lot to Mişu for spotting this problem!

Cheers, Albrecht.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Albrecht Dreß  -  Johanna-Kirchner-Straße 13  -  D-53123 Bonn (Germany)
       Phone (+49) 228 6199571  -  mailto:albrecht dress arcor de
  GnuPG public key:  http://www.mynetcologne.de/~nc-dreszal/pubkey.asc
_________________________________________________________________________
Index: src/sendmsg-window.c
===================================================================
RCS file: /cvs/gnome/balsa/src/sendmsg-window.c,v
retrieving revision 1.578
diff -u -r1.578 sendmsg-window.c
--- src/sendmsg-window.c	21 Feb 2006 03:51:39 -0000	1.578
+++ src/sendmsg-window.c	27 Feb 2006 13:53:01 -0000
@@ -6214,8 +6214,12 @@
 	bsmsg->gpg_mode |= LIBBALSA_PROTECT_ALWAYS_TRUST;
     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(bsmsg->gpg_sign_menu_item),
 				   ident->gpg_sign);
+    if (ident->gpg_sign)
+	bsmsg->gpg_mode |= LIBBALSA_PROTECT_SIGN;
     gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(bsmsg->gpg_encrypt_menu_item),
 				   ident->gpg_encrypt);
+    if (ident->gpg_encrypt)
+	bsmsg->gpg_mode |= LIBBALSA_PROTECT_ENCRYPT;
     switch (ident->crypt_protocol) {
     case LIBBALSA_PROTECT_OPENPGP:
 	bsmsg->gpg_mode |= LIBBALSA_PROTECT_OPENPGP;

Attachment: pgp6DNNcujfXs.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]