#endif
#include "mutt.h"
+#include "handler.h"
#include "pgp.h"
#include "pgppacket.h"
#include "mime.h"
#include <string.h>
#include <ctype.h>
+#include "lib/debug.h"
+
static struct {
short id;
const char *name;
static void pgp_dearmor (FILE * in, FILE * out)
{
char line[HUGE_STRING];
- long start;
- long end;
+ LOFF_T start;
+ LOFF_T end;
char *r;
STATE state;
break;
}
if (r == NULL) {
- dprint (1,
- (debugfile, "pgp_dearmor: Can't find begin of ASCII armor.\n"));
+ debug_print (1, ("Can't find begin of ASCII armor.\n"));
return;
}
break;
}
if (r == NULL) {
- dprint (1, (debugfile, "pgp_dearmor: Armor header doesn't end.\n"));
+ debug_print (1, ("Armor header doesn't end.\n"));
return;
}
/* actual data starts here */
- start = ftell (in);
+ start = ftello (in);
/* find the checksum */
break;
}
if (r == NULL) {
- dprint (1, (debugfile, "pgp_dearmor: Can't find end of ASCII armor.\n"));
+ debug_print (1, ("Can't find end of ASCII armor.\n"));
return;
}
- if ((end = ftell (in) - strlen (line)) < start) {
- dprint (1, (debugfile, "pgp_dearmor: end < start???\n"));
+ if ((end = ftello (in) - str_len (line)) < start) {
+ debug_print (1, ("end < start???\n"));
return;
}
- if (fseek (in, start, SEEK_SET) == -1) {
- dprint (1, (debugfile, "pgp_dearmor: Can't seekto start.\n"));
+ if (fseeko (in, start, SEEK_SET) == -1) {
+ debug_print (1, ("Can't seekto start.\n"));
return;
}
{
/* is signature? */
if ((p[0] & 0x3f) != PT_SIG) {
- dprint (1, (debugfile, "pgp_mic_from_packet: tag = %d, want %d.\n",
- p[0] & 0x3f, PT_SIG));
+ debug_print (1, ("tag = %d, want %d.\n", p[0] & 0x3f, PT_SIG));
return -1;
}
/* version 4 signature */
return (short) p[4];
else {
- dprint (1, (debugfile, "pgp_mic_from_packet: Bad signature packet.\n"));
+ debug_print (1, ("Bad signature packet.\n"));
return -1;
}
}
rv = pgp_mic_from_packet (p, l);
}
else {
- dprint (1, (debugfile, "pgp_find_hash: No packet.\n"));
+ debug_print (1, ("No packet.\n"));
}
bye: