From e966890252fac950a53189b6b928bfa4cd35e93c 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. --- doc/makedoc-defs.h | 3 +++ globals.h | 3 +++ init.h | 15 +++++++++++++++ mutt.h | 3 +++ 4 files changed, 24 insertions(+) diff --git a/doc/makedoc-defs.h b/doc/makedoc-defs.h index 78a4ebc0..a5e631fb 100644 --- a/doc/makedoc-defs.h +++ b/doc/makedoc-defs.h @@ -67,4 +67,7 @@ # ifndef USE_COMPRESSED # define USE_COMPRESSED # endif +# ifndef USE_AUTOCRYPT +# define USE_AUTOCRYPT +# endif #endif diff --git a/globals.h b/globals.h index 4d508221..68c7e40c 100644 --- a/globals.h +++ b/globals.h @@ -40,6 +40,9 @@ WHERE char *Attribution; WHERE char *AttributionLocale; WHERE char *AttachCharset; WHERE char *AttachFormat; +#ifdef USE_AUTOCRYPT +WHERE char *AutocryptDir; +#endif WHERE char *Charset; WHERE char *ComposeFormat; WHERE char *ConfigCharset; diff --git a/init.h b/init.h index 28eb37ba..c2b8fa6d 100644 --- a/init.h +++ b/init.h @@ -317,6 +317,21 @@ struct option_t 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, R_NONE, {.l=OPTAUTOCRYPT}, {.l=0} }, + /* + ** .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_PATH, R_NONE, {.p=&AutocryptDir}, {.p="~/.mutt/autocrypt"} }, + /* + ** .pp + ** This variable sets where autocrypt files are stored, including the GPG + ** keyring and sqlite database. + */ +#endif { "autoedit", DT_BOOL, R_NONE, {.l=OPTAUTOEDIT}, {.l=0} }, /* ** .pp diff --git a/mutt.h b/mutt.h index 77082bdb..35a3ae60 100644 --- a/mutt.h +++ b/mutt.h @@ -379,6 +379,9 @@ enum OPTASKBCC, OPTASKCC, OPTATTACHSPLIT, +#ifdef USE_AUTOCRYPT + OPTAUTOCRYPT, +#endif OPTAUTOEDIT, OPTAUTOSUBSCRIBE, OPTAUTOTAG, -- 2.40.0