]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Add pkcs7 content type flag
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Dec 2020 16:17:42 +0000 (16:17 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Dec 2020 17:17:31 +0000 (17:17 +0000)
src/libmime/content_type.c
src/libmime/content_type.h

index 0c06f51fb3d23c25b1a984ade7e34b8d0c6ed1f0..7b9c213ca6de52640a0fe975835906652ba31176 100644 (file)
@@ -706,6 +706,12 @@ rspamd_content_type_parse (const gchar *in,
                                res->flags |= RSPAMD_CONTENT_TYPE_BROKEN;
                                RSPAMD_FTOK_ASSIGN (&res->subtype, "alternative");
                        }
+
+                       /* PKCS7 smime */
+                       RSPAMD_FTOK_ASSIGN (&srch, "x-pkcs7-mime");
+                       if (rspamd_ftok_casecmp (&res->subtype, &srch) == 0) {
+                               res->flags |= RSPAMD_CONTENT_TYPE_SMIME;
+                       }
                }
 
                RSPAMD_FTOK_ASSIGN (&srch, "multipart");
index 0f7b8e96328cbb6f3a6556d69819fa6724ba6008..6bc7262e7a952937ef7578ef246231fa3d3364ab 100644 (file)
@@ -33,6 +33,7 @@ enum rspamd_content_type_flags {
        RSPAMD_CONTENT_TYPE_DSN = 1 << 4,
        RSPAMD_CONTENT_TYPE_MISSING = 1 << 5,
        RSPAMD_CONTENT_TYPE_ENCRYPTED = 1 << 6,
+       RSPAMD_CONTENT_TYPE_SMIME = 1 << 7,
 };
 
 enum rspamd_content_param_flags {