53 { 1,
"pgp-md5" }, { 2,
"pgp-sha1" }, { 3,
"pgp-ripemd160" },
54 { 5,
"pgp-md2" }, { 6,
"pgp-tiger192" }, { 7,
"pgp-haval-5-160" },
55 { 8,
"pgp-sha256" }, { 9,
"pgp-sha384" }, { 10,
"pgp-sha512" },
56 { 11,
"pgp-sha224" }, { -1, NULL },
79 char line[8192] = { 0 };
82 struct State state = { 0 };
88 while ((r = fgets(line,
sizeof(line),
fp_in)))
101 while ((r = fgets(line,
sizeof(line),
fp_in)))
114 LOFF_T start = ftello(
fp_in);
120 while ((r = fgets(line,
sizeof(line),
fp_in)))
131 LOFF_T end = ftello(
fp_in) - strlen(line);
155 if ((p[0] & 0x3f) !=
PT_SIG)
161 if ((len >= 18) && (p[1] == 3))
164 return (
short) p[17];
166 else if ((len >= 5) && (p[1] == 4))
Convenience wrapper for the core headers.
bool mutt_file_seek(FILE *fp, LOFF_T offset, int whence)
Wrapper for fseeko with error handling.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
#define mutt_debug(LEVEL,...)
void mutt_decode_base64(struct State *state, size_t len, bool istext, iconv_t cd)
Decode base64-encoded text.
Decide how to display email content.
@ LL_DEBUG1
Log at debug level 1.
#define ICONV_T_INVALID
Error value for iconv functions.
Convenience wrapper for the library headers.
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
static short pgp_mic_from_packet(unsigned char *p, size_t len)
Get the hash algorithm from a PGP packet.
static const struct HashAlgorithm HashAlgorithms[]
PGP Hashing algorithms.
static const char * pgp_hash_to_micalg(short id)
Lookup a hash name, given its id.
static short pgp_find_hash(const char *fname)
Find the hash algorithm of a file.
static void pgp_dearmor(FILE *fp_in, FILE *fp_out)
Unwrap an armoured PGP block.
const char * pgp_micalg(const char *fname)
Find the hash algorithm of a file.
Identify the hash algorithm from a PGP signature.
void pgp_release_packet(void)
Free the cached PGP packet.
unsigned char * pgp_read_packet(FILE *fp, size_t *len)
Read a PGP packet from a file.
@ PT_SIG
Signature Packet.
const char * name
Algorithm name.
Keep track when processing files.
FILE * fp_out
File to write to.
FILE * fp_in
File to read from.
#define mutt_file_mkstemp()