]> granicus.if.org Git - neomutt/commitdiff
Add autocrypt config vars
authorKevin McCarthy <kevin@8t8.us>
Sat, 6 Jul 2019 18:35:22 +0000 (11:35 -0700)
committerRichard Russon <rich@flatcap.org>
Mon, 19 Aug 2019 23:14:27 +0000 (00:14 +0100)
Co-authored-by: Richard Russon <rich@flatcap.org>
doc/makedoc_defs.h
globals.h
init.h

index d9b5dd325c40817dae285c8a0b4b736b94b6856e..c78d9be5f9999bf0972d518b3cc107d06c88712c 100644 (file)
@@ -87,6 +87,9 @@
 #ifndef USE_NOTMUCH
 #define USE_NOTMUCH
 #endif
+#ifndef USE_AUTOCRYPT
+#define USE_AUTOCRYPT
+#endif
 #endif
 
 #endif /* _MUTT_MAKEDOC_DEFS_H */
index f53885be4eadc63b84488790ab7be0368e52d8df..e31bafa4b1bd471dbc25f0658d87de27e02c1eaf 100644 (file)
--- 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 d2cdcde3babcc11df010d1349cd427bc80695ac1..39773a8d00c0e0a6ca8c399c48aa0ea9302d4a54 100644 (file)
--- a/init.h
+++ b/init.h
@@ -390,6 +390,21 @@ struct ConfigDef MuttVars[] = {
   ** unset, you must first use the \fC<tag-prefix>\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