]> granicus.if.org Git - neomutt/commitdiff
Add another struct Email security bit for autocrypt
authorKevin McCarthy <kevin@8t8.us>
Sat, 20 Jul 2019 21:48:06 +0000 (14:48 -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>
email/email.h
ncrypt/ncrypt.h

index f927141f68c55032906b931e28ce0c43b693f0e9..6a2db383c3f754b3d0897ec794994d5ae4a81020 100644 (file)
@@ -38,7 +38,7 @@ struct Notify;
  */
 struct Email
 {
-  SecurityFlags security;      ///< bit 0-8: flags, bit 9,10: application.
+  SecurityFlags security;      ///< bit 0-9: flags, bit 10,11: application, bit 12 traditional pgp
                                ///< See: ncrypt/ncrypt.h pgplib.h, smime.h
 
   bool mime            : 1;    ///< Has a MIME-Version header?
index 1f37eae4ac6986227c4e7aace80e710230e18b87..81f7d158ec192281e7f0022d567f017507c21812 100644 (file)
@@ -128,11 +128,12 @@ typedef uint16_t SecurityFlags;           ///< Flags, e.g. #SEC_ENCRYPT
 #define SEC_KEYBLOCK            (1 << 6)  ///< Email has a key attached
 #define SEC_INLINE              (1 << 7)  ///< Email has an inline signature
 #define SEC_OPPENCRYPT          (1 << 8)  ///< Opportunistic encrypt mode
-#define APPLICATION_PGP         (1 << 9)  ///< Use PGP to encrypt/sign
-#define APPLICATION_SMIME       (1 << 10) ///< Use SMIME to encrypt/sign
-#define PGP_TRADITIONAL_CHECKED (1 << 11) ///< Email has a traditional (inline) signature
+#define SEC_AUTOCRYPT           (1 << 9)  ///< TODO: should this include the SEC_ENCRYPT and SEC_SIGN flags
+#define APPLICATION_PGP         (1 << 10) ///< Use PGP to encrypt/sign
+#define APPLICATION_SMIME       (1 << 11) ///< Use SMIME to encrypt/sign
+#define PGP_TRADITIONAL_CHECKED (1 << 12) ///< Email has a traditional (inline) signature
 
-#define SEC_ALL_FLAGS          ((1 << 12) - 1)
+#define SEC_ALL_FLAGS          ((1 << 13) - 1)
 
 #define PGP_ENCRYPT  (APPLICATION_PGP | SEC_ENCRYPT)
 #define PGP_SIGN     (APPLICATION_PGP | SEC_SIGN)