X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fpgpmicalg.c;h=4e5e836838abdd07f4d2433aefb1f449a60312a3;hb=c8e3d1cce2a8af0b4725e1a751f8795bf04487da;hp=a2d89db150a41177549051dadd53821b68a52ea1;hpb=230399f9632c37b66c1c117a17e8327eae6b3235;p=apps%2Fmadmutt.git diff --git a/lib-crypt/pgpmicalg.c b/lib-crypt/pgpmicalg.c index a2d89db..4e5e836 100644 --- a/lib-crypt/pgpmicalg.c +++ b/lib-crypt/pgpmicalg.c @@ -11,25 +11,16 @@ * algorithm. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include + +#include +#include -#include "mutt.h" #include "handler.h" #include "pgp.h" #include "pgppacket.h" #include "charset.h" -#include -#include -#include -#include - -#include -#include - -#include static struct { short id; @@ -146,15 +137,15 @@ static short pgp_find_hash (const char *fname) short rv = -1; - mutt_mktemp (tempfile); - if ((out = safe_fopen (tempfile, "w+")) == NULL) { - mutt_perror (tempfile); + out = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); + if (!out) { + mutt_perror (_("Can't create temporary file")); goto bye; } unlink (tempfile); if ((in = fopen (fname, "r")) == NULL) { - mutt_perror (fname); + mutt_perror (_("Can't create temporary file")); goto bye; } @@ -167,8 +158,8 @@ static short pgp_find_hash (const char *fname) bye: - safe_fclose (&in); - safe_fclose (&out); + m_fclose(&in); + m_fclose(&out); pgp_release_packet (); return rv; }