X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fpgpmicalg.c;h=4e5e836838abdd07f4d2433aefb1f449a60312a3;hb=6ce74784b17c30f98db577d03b03e67d9885df47;hp=f750e192e1371c5db17159ddaf43a34c9857348d;hpb=2293e9bc5a94ef33dc596b064c607d6bed5ad1fd;p=apps%2Fmadmutt.git diff --git a/lib-crypt/pgpmicalg.c b/lib-crypt/pgpmicalg.c index f750e19..4e5e836 100644 --- a/lib-crypt/pgpmicalg.c +++ b/lib-crypt/pgpmicalg.c @@ -11,24 +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 static struct { short id; @@ -145,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; } @@ -166,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; }