[Replying back to the list]

Michael Schwipps wrote:
> Kevin J. McCarthy wrote:

> > The patch looks good, and I've just pushed it up, but I'd like to ask
> > you (and other S/MIME users) to check a couple things while I'm adding
> > the patch in:
> > 
> > In the documentation for smime_encrypt_with it says "If unset,
> > "3des" (TripleDES) is used."
> > 
> > First, should this say "des3" instead?
> 
> No - see next question. ;)
>
> > Second, if smime_encrypt_with is indeed unset, does it actually work?
> 
> No. It's only the default value in contrib/smime.rc .
> 
> > Just by looking at the source I haven't been able to find any such
> > defaulting behavior.  To me it looks like the smime_encrypt_command will
> > just replace %a with an empty string and you'll get an error.  
> 
> Right - you get an error, if smime_encrypt_with is unset and openssl is 
> called.
> 
> Editing the documentation and smime.rc would be easy. 
> 
> Is there any need to implement a "real", C-based default value?

I'm attaching a patch that instead creates a default of "des3" for the
smime_encrypt_with option.  Since it doesn't work unset, the patch
removes the comment about that.  The manual will now list
   Default: "des3".
for smime_encrypt_with.

I'd appreciate if you would check to make sure the patch works.  Try
commenting out your smime_encrypt_with setting in your muttrc,
and hopefully it won't give an error (note that *unsetting*
smime_encrypt_with will of course still give an error).

Thanks,

-Kevin
# HG changeset patch
# User Kevin McCarthy <[email protected]>
# Date 1422816423 28800
#      Sun Feb 01 10:47:03 2015 -0800
# Node ID 9bdc56ccef1fc13d611fa8fd7b5e9f712c5e99b4
# Parent  1235dd48ef3f87480d62996a216eeca4e09e5e8a
[mq]: fix-defaults

diff --git a/init.h b/init.h
--- a/init.h
+++ b/init.h
@@ -2682,22 +2682,21 @@
   /*
   ** .pp
   ** This command is used to create encrypted S/MIME messages.
   ** .pp
   ** This is a format string, see the $$smime_decrypt_command command for
   ** possible \fCprintf(3)\fP-like sequences.
   ** (S/MIME only)
   */
-  { "smime_encrypt_with",      DT_STR,  R_NONE, UL &SmimeCryptAlg, 0 },
+  { "smime_encrypt_with",      DT_STR,  R_NONE, UL &SmimeCryptAlg, UL "des3" },
   /*
   ** .pp
   ** This sets the algorithm that should be used for encryption.
   ** Valid choices are ``aes128'', ``aes192'', ``aes256'', ``des'', ``des3'', 
``rc2-40'', ``rc2-64'', ``rc2-128''.
-  ** If \fIunset\fP, ``3des'' (TripleDES) is used.
   ** (S/MIME only)
   */
   { "smime_get_cert_command",  DT_STR, R_NONE, UL &SmimeGetCertCommand, 0},
   /*
   ** .pp
   ** This command is used to extract X509 certificates from a PKCS7 structure.
   ** .pp
   ** This is a format string, see the $$smime_decrypt_command command for

Attachment: signature.asc
Description: PGP signature

Reply via email to