X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-crypt%2Fpgp.c;h=bb55885116d6b17eb999f3fa0c547cfc7e9b007e;hp=038ba8112ef3ce22fb19f68cce0cb21e0be8e756;hb=2293e9bc5a94ef33dc596b064c607d6bed5ad1fd;hpb=1ffe18af5bf2fda6f7dc86c514b56c6a82ec3040 diff --git a/lib-crypt/pgp.c b/lib-crypt/pgp.c index 038ba81..bb55885 100644 --- a/lib-crypt/pgp.c +++ b/lib-crypt/pgp.c @@ -31,6 +31,7 @@ #include #include +#include #include "mutt.h" #include "handler.h" @@ -38,7 +39,6 @@ #include "copy.h" #include "attach.h" -#include "lib/debug.h" #include #include @@ -61,7 +61,6 @@ #endif #include "crypt.h" -#include "mutt_menu.h" char PgpPass[LONG_STRING]; @@ -148,15 +147,12 @@ static int pgp_copy_checksig (FILE * fpin, FILE * fpout) if (PgpGoodSign.pattern) { char *line = NULL; int lineno = 0; - size_t linelen; + ssize_t linelen; while ((line = mutt_read_line (line, &linelen, fpin, &lineno)) != NULL) { if (regexec (PgpGoodSign.rx, line, 0, NULL, 0) == 0) { - debug_print (2, ("\"%s\" matches regexp.\n", line)); rv = 0; } - else - debug_print (2, ("\"%s\" doesn't match regexp.\n", line)); if (strncmp (line, "[GNUPG:] ", 9) == 0) continue; @@ -166,7 +162,6 @@ static int pgp_copy_checksig (FILE * fpin, FILE * fpout) p_delete(&line); } else { - debug_print (2, ("No pattern.\n")); mutt_copy_stream (fpin, fpout); rv = 1; } @@ -192,7 +187,7 @@ static void pgp_copy_clearsigned (FILE * fpin, STATE * s, char *charset) char buf[HUGE_STRING]; short complete, armor_header; - FGETCONV *fc; + fgetconv_t *fc; rewind (fpin); @@ -419,8 +414,7 @@ int pgp_application_pgp_handler (BODY * m, STATE * s) pgp_copy_clearsigned (tmpfp, s, body_charset); } else if (pgpout) { - FGETCONV *fc; - int c; + fgetconv_t *fc; rewind (pgpout); state_set_prefix (s); @@ -602,8 +596,6 @@ int pgp_verify_one (BODY * sigbdy, STATE * s, const char *tempfile) if ((rv = mutt_wait_filter (thepid))) badsig = -1; - - debug_print (1, ("mutt_wait_filter returned %d.\n", rv)); } safe_fclose (&pgperr); @@ -613,8 +605,6 @@ int pgp_verify_one (BODY * sigbdy, STATE * s, const char *tempfile) mutt_unlink (sigfile); mutt_unlink (pgperrfile); - debug_print (1, ("returning %d.\n", badsig)); - return badsig; } @@ -1145,8 +1135,8 @@ char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc) } else if (r == -1) { p_delete(&keylist); - address_delete (&tmp); - address_delete (&addr); + address_list_wipe(&tmp); + address_list_wipe(&addr); return NULL; } } @@ -1162,8 +1152,8 @@ char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc) if ((key = pgp_ask_for_key (buf, q->mailbox, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) { p_delete(&keylist); - address_delete (&tmp); - address_delete (&addr); + address_list_wipe(&tmp); + address_list_wipe(&addr); return NULL; } } @@ -1180,10 +1170,10 @@ char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc) keylist_used = m_strlen(keylist); pgp_free_key (&key); - address_delete (&addr); + address_list_wipe(&addr); } - address_delete (&tmp); + address_list_wipe(&tmp); return (keylist); } @@ -1358,9 +1348,9 @@ BODY *pgp_traditional_encryptsign (BODY * a, int flags, char *keylist) else from_charset = Charset; - if (!mutt_is_us_ascii (body_charset)) { + if (!charset_is_us_ascii (body_charset)) { int c; - FGETCONV *fc; + fgetconv_t *fc; if (flags & ENCRYPT) send_charset = "us-ascii";