NeoMutt  2022-04-29-323-g5fcc6c
Teaching an old dog new tricks
DOXYGEN
pgp_check_traditional()

Look for inline (non-MIME) PGP content. More...

+ Collaboration diagram for pgp_check_traditional():

Functions

bool pgp_gpgme_check_traditional (FILE *fp, struct Body *b, bool just_one)
 Implements CryptModuleSpecs::pgp_check_traditional() -. More...
 
bool pgp_class_check_traditional (FILE *fp, struct Body *b, bool just_one)
 Implements CryptModuleSpecs::pgp_check_traditional() -. More...
 

Detailed Description

Look for inline (non-MIME) PGP content.

Parameters
fpFile pointer to the current attachment
bBody of email to check
just_oneIf true, just check one email part
Return values
trueIt's an inline PGP email
falseIt's not inline, or an error

Function Documentation

◆ pgp_gpgme_check_traditional()

bool pgp_gpgme_check_traditional ( FILE *  fp,
struct Body b,
bool  just_one 
)

Implements CryptModuleSpecs::pgp_check_traditional() -.

Definition at line 2223 of file crypt_gpgme.c.

2224{
2225 bool rc = false;
2226 for (; b; b = b->next)
2227 {
2228 if (!just_one && is_multipart(b))
2229 rc = (pgp_gpgme_check_traditional(fp, b->parts, false) || rc);
2230 else if (b->type == TYPE_TEXT)
2231 {
2233 if (r)
2234 rc = (rc || r);
2235 else
2236 rc = (pgp_check_traditional_one_body(fp, b) || rc);
2237 }
2238
2239 if (just_one)
2240 break;
2241 }
2242 return rc;
2243}
SecurityFlags mutt_is_application_pgp(struct Body *b)
Does the message use PGP?
Definition: crypt.c:542
static int pgp_check_traditional_one_body(FILE *fp, struct Body *b)
Check one inline PGP body part.
Definition: crypt_gpgme.c:2158
bool pgp_gpgme_check_traditional(FILE *fp, struct Body *b, bool just_one)
Implements CryptModuleSpecs::pgp_check_traditional() -.
Definition: crypt_gpgme.c:2223
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
#define is_multipart(body)
Definition: mime.h:82
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:76
struct Body * parts
parts of a multipart or message/rfc822
Definition: body.h:72
struct Body * next
next attachment in the list
Definition: body.h:71
unsigned int type
content-type primary type, ContentType
Definition: body.h:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pgp_class_check_traditional()

bool pgp_class_check_traditional ( FILE *  fp,
struct Body b,
bool  just_one 
)

Implements CryptModuleSpecs::pgp_check_traditional() -.

Definition at line 853 of file pgp.c.

854{
855 bool rc = false;
856 int r;
857 for (; b; b = b->next)
858 {
859 if (!just_one && is_multipart(b))
860 rc = pgp_class_check_traditional(fp, b->parts, false) || rc;
861 else if (b->type == TYPE_TEXT)
862 {
864 if (r)
865 rc = rc || r;
866 else
867 rc = pgp_check_traditional_one_body(fp, b) || rc;
868 }
869
870 if (just_one)
871 break;
872 }
873
874 return rc;
875}
bool pgp_class_check_traditional(FILE *fp, struct Body *b, bool just_one)
Implements CryptModuleSpecs::pgp_check_traditional() -.
Definition: pgp.c:853
static bool pgp_check_traditional_one_body(FILE *fp, struct Body *b)
Check the body of an inline PGP message.
Definition: pgp.c:785
+ Here is the call graph for this function:
+ Here is the caller graph for this function: