#include <ctype.h>
#include <lib-lib/file.h>
-#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
break;
}
if (r == NULL) {
- debug_print (1, ("Can't find begin of ASCII armor.\n"));
return;
}
break;
}
if (r == NULL) {
- debug_print (1, ("Armor header doesn't end.\n"));
return;
}
break;
}
if (r == NULL) {
- debug_print (1, ("Can't find end of ASCII armor.\n"));
return;
}
if ((end = ftello (in) - m_strlen(line)) < start) {
- debug_print (1, ("end < start???\n"));
return;
}
if (fseeko (in, start, SEEK_SET) == -1) {
- debug_print (1, ("Can't seekto start.\n"));
return;
}
{
/* is signature? */
if ((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 {
- debug_print (1, ("Bad signature packet.\n"));
return -1;
}
}
if ((p = pgp_read_packet (out, &l)) != NULL) {
rv = pgp_mic_from_packet (p, l);
}
- else {
- debug_print (1, ("No packet.\n"));
- }
bye: