From 91edf992058e6f8a5b32280149d330522d544ef7 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Sat, 6 Jul 2019 11:35:22 -0700 Subject: [PATCH] Add autocrypt config vars Co-authored-by: Richard Russon --- doc/makedoc_defs.h | 3 +++ globals.h | 6 ++++++ init.h | 15 +++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/doc/makedoc_defs.h b/doc/makedoc_defs.h index d9b5dd325..c78d9be5f 100644 --- a/doc/makedoc_defs.h +++ b/doc/makedoc_defs.h @@ -87,6 +87,9 @@ #ifndef USE_NOTMUCH #define USE_NOTMUCH #endif +#ifndef USE_AUTOCRYPT +#define USE_AUTOCRYPT +#endif #endif #endif /* _MUTT_MAKEDOC_DEFS_H */ diff --git a/globals.h b/globals.h index f53885be4..e31bafa4b 100644 --- a/globals.h +++ b/globals.h @@ -96,6 +96,9 @@ WHERE char *C_AliasFile; ///< Config: Save new aliases to th WHERE char *C_Attribution; ///< Config: Message to start a reply, "On DATE, PERSON wrote:" WHERE char *C_AttributionLocale; ///< Config: Locale for dates in the attribution message WHERE char *C_AttachFormat; ///< Config: printf-like format string for the attachment menu +#ifdef USE_AUTOCRYPT +WHERE char *C_AutocryptDir; +#endif WHERE char *C_ConfigCharset; ///< Config: Character set that the config files are in WHERE char *C_CryptProtectedHeadersSubject; ///< Config: Use this as the subject for encrypted emails WHERE char *C_DateFormat; ///< Config: strftime format string for the `%d` expando @@ -196,6 +199,9 @@ WHERE bool C_ArrowCursor; ///< Config: Use an arrow '->' inst WHERE bool C_AsciiChars; ///< Config: Use plain ASCII characters, when drawing email threads WHERE bool C_Askbcc; ///< Config: Ask the user for the blind-carbon-copy recipients WHERE bool C_Askcc; ///< Config: Ask the user for the carbon-copy recipients +#ifdef USE_AUTOCRYPT +WHERE bool C_Autocrypt; +#endif WHERE bool C_Autoedit; ///< Config: Skip the initial compose menu and edit the email WHERE bool C_AutoTag; ///< Config: Automatically apply actions to all tagged messages WHERE bool C_Beep; ///< Config: Make a noise when an error occurs diff --git a/init.h b/init.h index d2cdcde3b..39773a8d0 100644 --- a/init.h +++ b/init.h @@ -390,6 +390,21 @@ struct ConfigDef MuttVars[] = { ** unset, you must first use the \fC\fP function (bound to ";" ** by default) to make the next function apply to all tagged messages. */ +#ifdef USE_AUTOCRYPT + { "autocrypt", DT_BOOL, &C_Autocrypt, false }, + /* + ** .pp + ** When \fIset\fP, enables autocrypt, https://autocrypt.org/, which provides + ** passive encryption protection with keys exchanged via headers. + ** TODO: add a section in the manual describing this is more detail. + */ + { "autocrypt_dir", DT_STRING|DT_PATH, &C_AutocryptDir, IP "~/.mutt/autocrypt" }, + /* + ** .pp + ** This variable sets where autocrypt files are stored, including the GPG + ** keyring and sqlite database. + */ +#endif { "autoedit", DT_BOOL, &C_Autoedit, false }, /* ** .pp -- 2.40.0