Quoting Ren? Clerc <[EMAIL PROTECTED]> on Tue, Sep 24 19:08: > > I'm looking for the S/MIME equivalent of the GnuPG option: > > encrypt-to <key-id>
As far as I could tell, it doesn't exist. This patch add that functionality. Set $smime_encrypt_self to true and S/MIME encrypted messages you send will also be encrypted to $smime_default_key. Omen -- Disclaimer: "These opinions are my own, though for a small fee they be yours too."
? .command.sh
? .config
? ^
? patch-1.5.1-ow.smime-encrypt-self.1
? patchlist.c
? pgpewrap
? smime_keys
Index: crypt.c
===================================================================
RCS file: /home/roessler/cvs/mutt/crypt.c,v
retrieving revision 3.8
diff -u -d -b -B -r3.8 crypt.c
--- crypt.c 26 Mar 2002 22:23:57 -0000 3.8
+++ crypt.c 28 Aug 2002 21:57:19 -0000
@@ -243,6 +243,13 @@
#ifdef HAVE_SMIME
if (msg->security & APPLICATION_SMIME)
{
+ if (OPTSMIMEENCRYPTSELF && SmimeDefaultKey) {
+ int keylist_size;
+
+ keylist_size = mutt_strlen(keylist) + mutt_strlen (SmimeDefaultKey)
++ 1;
+ safe_realloc ((void **)&keylist, keylist_size);
+ sprintf (keylist + mutt_strlen(keylist), "%s\n", SmimeDefaultKey);
+ /* __SPRINTF_CHECKED__ */
+ }
if (!(tmp_pbody = smime_build_smime_entity (tmp_smime_pbody, keylist)))
{
/* signed ? free it! */
Index: init.h
===================================================================
RCS file: /home/roessler/cvs/mutt/init.h,v
retrieving revision 3.20
diff -u -d -b -B -r3.20 init.h
--- init.h 9 Aug 2002 06:58:35 -0000 3.20
+++ init.h 28 Aug 2002 21:57:20 -0000
@@ -1508,6 +1508,11 @@
#endif /* HAVE_PGP */
#ifdef HAVE_SMIME
+ { "smime_encrypt_self", DT_BOOL, R_NONE, OPTSMIMEENCRYPTSELF,
+1 },
+ /*
+ ** .pp
+ ** Encrypt the message to smime_default_key too.
+ */
{ "smime_timeout", DT_NUM, R_NONE, UL &SmimeTimeout, 300 },
/*
** .pp
Index: mutt.h
===================================================================
RCS file: /home/roessler/cvs/mutt/mutt.h,v
retrieving revision 3.10
diff -u -d -b -B -r3.10 mutt.h
--- mutt.h 24 Jul 2002 09:46:50 -0000 3.10
+++ mutt.h 28 Aug 2002 21:57:20 -0000
@@ -437,6 +437,7 @@
OPTCRYPTREPLYSIGNENCRYPTED,
OPTCRYPTTIMESTAMP,
#ifdef HAVE_SMIME
+ OPTSMIMEENCRYPTSELF,
OPTSMIMEISDEFAULT,
OPTASKCERTLABEL,
OPTSDEFAULTDECRYPTKEY,
Index: PATCHES
===================================================================
--- PATCHES~ Tue Nov 6 19:59:33 2001
+++ PATCHES Tue Nov 6 19:59:42 2001
@@ -1,0 +1 @@
+patch-1.5.1-ow.smime-encrypt-self.1
smime.p7s
Description: application/pkcs7-signature
