From: Kevin McCarthy Date: Sat, 20 Jul 2019 21:48:06 +0000 (-0700) Subject: Add another struct Email security bit for autocrypt X-Git-Tag: 2019-10-25~97^2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3785d9c434f2e4774357ec0fa14c3da0359b509d;p=neomutt Add another struct Email security bit for autocrypt Co-authored-by: Richard Russon --- diff --git a/email/email.h b/email/email.h index f927141f6..6a2db383c 100644 --- a/email/email.h +++ b/email/email.h @@ -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? diff --git a/ncrypt/ncrypt.h b/ncrypt/ncrypt.h index 1f37eae4a..81f7d158e 100644 --- a/ncrypt/ncrypt.h +++ b/ncrypt/ncrypt.h @@ -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)