From: Thomas Roessler Date: Mon, 28 Jan 2002 23:29:05 +0000 (+0000) Subject: Add a new crypt_timestamp option. The timestamps aren't really X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45f732394f09774fa8a6f7ed6e4fc709359ba8e8;p=neomutt Add a new crypt_timestamp option. The timestamps aren't really needed any more. --- diff --git a/crypt.c b/crypt.c index 22f8c5349..95122b6ea 100644 --- a/crypt.c +++ b/crypt.c @@ -63,12 +63,18 @@ void crypt_current_time(STATE *s, char *app_name) time_t t; char p[STRING], tmp[STRING]; - t = time(NULL); - setlocale (LC_TIME, ""); - snprintf (tmp, sizeof (tmp), _("[-- %s output follows(current time: %%c) --]\n"), NONULL(app_name)); - strftime (p, sizeof (p), tmp, localtime (&t)); - setlocale (LC_TIME, "C"); - state_attach_puts (p, s); + if (option (OPTCRYPTTIMESTAMP)) + { + t = time(NULL); + setlocale (LC_TIME, ""); + strftime (p, sizeof (p), _(" (current time: %c)"), localtime (&t)); + setlocale (LC_TIME, "C"); + } + else + *p = '\0'; + + snprintf (tmp, sizeof (tmp), _("[-- %s output follows%s --]\n"), NONULL(app_name), p); + state_attach_puts (tmp, s); } diff --git a/init.h b/init.h index 52442c171..9d830b4ea 100644 --- a/init.h +++ b/init.h @@ -1222,6 +1222,14 @@ struct option_t MuttVars[] = { ** noted in ``$$crypt_replysign'', that mutt is not able to find out ** whether an encrypted message is also signed. */ + { "crypt_timestamp", DT_BOOL, R_NONE, OPTCRYPTTIMESTAMP, 1 }, + /* + ** .pp + ** If set, mutt will include a time stamp in the lines surrounding + ** PGP or S/MIME output, so spoofing such lines is more difficult. + ** If you are using colors to mark these lines, and rely on these, + ** you may unset this setting. + */ #ifdef HAVE_PGP { "pgp_verify_sig", DT_SYN, R_NONE, UL "crypt_verify_sig", 0}, #endif diff --git a/mutt.h b/mutt.h index f4136d90e..b8e2df4c5 100644 --- a/mutt.h +++ b/mutt.h @@ -422,6 +422,7 @@ enum OPTCRYPTREPLYENCRYPT, OPTCRYPTREPLYSIGN, OPTCRYPTREPLYSIGNENCRYPTED, + OPTCRYPTTIMESTAMP, #ifdef HAVE_SMIME OPTSMIMEISDEFAULT, #endif