<<< Date Index >>>     <<< Thread Index >>>

Smime problem when smime_ask_for_key is called in smime_findKeys



A change to smime.c introduced with mutt-1.5.7 causes smime en/decryption to
fail under circumstances which need a call to smime_ask_for_key. This is
the case if no default smime key has been specified or a recipient's key
can't be figured out.

The problem is that smime_ask_for_key always add a newline "\n" and the new
code in smime_findKeys adds a second one, which results in a blank line. Those
blank lines are then expanded to the directory where the smime certificates are
stored and openssl fails because a directory isn't a valid input.

I use the attached patch in FreeBSD's mutt-devel port to fix that (in fact
it's the code from mutt-1.5.6).


Best regards

-- 
Udo Schweigert, Siemens AG   | Voice      : +49 89 636 42170
CT IC CERT, Siemens CERT     | Fax        : +49 89 636 41166
D-81730 Muenchen / Germany   | email      : udo.schweigert@xxxxxxxxxxx
--- smime.c.orig2       Thu Feb  3 19:47:53 2005
+++ smime.c     Sat Feb 19 13:44:57 2005
@@ -800,9 +800,9 @@
       return NULL;
     }
     
-    keylist_size += mutt_strlen (keyID) + 2;
+    keylist_size += mutt_strlen (keyID) + 1;
     safe_realloc (&keylist, keylist_size);
-    sprintf (keylist + keylist_used, "%s\n", keyID);   /* __SPRINTF_CHECKED__ 
*/
+    sprintf (keylist + keylist_used, "%s", keyID);     /* __SPRINTF_CHECKED__ 
*/
     keylist_used = mutt_strlen (keylist);
 
     rfc822_free_address (&addr);