diff options
author | Brendan Cully <brendan@kublai.com> | 2005-08-11 21:16:38 +0000 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2005-08-11 21:16:38 +0000 |
commit | a281b7cc304ebd981afd04248edff6191d73b686 (patch) | |
tree | 11ff65492f622111dab4ce280427d8127f908165 /cryptglue.c | |
parent | b7cb2829bc6737a010bc841772922a1159bf7fc0 (diff) |
Add error results to mutt_body_handlers, and check them when doing
decode-save. Closes: #1919.
Diffstat (limited to 'cryptglue.c')
-rw-r--r-- | cryptglue.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cryptglue.c b/cryptglue.c index f6a1bab3..e98e8625 100644 --- a/cryptglue.c +++ b/cryptglue.c @@ -147,17 +147,21 @@ int crypt_pgp_decrypt_mime (FILE *a, FILE **b, BODY *c, BODY **d) } /* MIME handler for the application/pgp content-type. */ -void crypt_pgp_application_pgp_handler (BODY *m, STATE *s) +int crypt_pgp_application_pgp_handler (BODY *m, STATE *s) { if (CRYPT_MOD_CALL_CHECK (PGP, application_handler)) - (CRYPT_MOD_CALL (PGP, application_handler)) (m, s); + return (CRYPT_MOD_CALL (PGP, application_handler)) (m, s); + + return -1; } /* MIME handler for an PGP/MIME encrypted message. */ -void crypt_pgp_encrypted_handler (BODY *a, STATE *s) +int crypt_pgp_encrypted_handler (BODY *a, STATE *s) { if (CRYPT_MOD_CALL_CHECK (PGP, encrypted_handler)) - (CRYPT_MOD_CALL (PGP, encrypted_handler)) (a, s); + return (CRYPT_MOD_CALL (PGP, encrypted_handler)) (a, s); + + return -1; } /* fixme: needs documentation. */ @@ -290,10 +294,12 @@ int crypt_smime_decrypt_mime (FILE *a, FILE **b, BODY *c, BODY **d) } /* MIME handler for the application/smime content-type. */ -void crypt_smime_application_smime_handler (BODY *m, STATE *s) +int crypt_smime_application_smime_handler (BODY *m, STATE *s) { if (CRYPT_MOD_CALL_CHECK (SMIME, application_handler)) - (CRYPT_MOD_CALL (SMIME, application_handler)) (m, s); + return (CRYPT_MOD_CALL (SMIME, application_handler)) (m, s); + + return -1; } /* MIME handler for an PGP/MIME encrypted message. */ |