summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
05d5b19)
Author: noodles
Date: 2003/06/08 10:45:44
Log a critical error when we can't parse a subkey packet rather than asserting.
*
* Copyright 2002 Project Purple
*
*
* Copyright 2002 Project Purple
*
- * $Id: decodekey.c,v 1.2 2003/06/04 20:57:07 noodles Exp $
+ * $Id: decodekey.c,v 1.3 2003/06/08 10:45:44 noodles Exp $
#include "keyid.h"
#include "keystructs.h"
#include "ll.h"
#include "keyid.h"
#include "keystructs.h"
#include "ll.h"
/*
* parse_subpackets - Parse the subpackets of a Type 4 signature.
/*
* parse_subpackets - Parse the subpackets of a Type 4 signature.
packetlen <<= 8;
packetlen = data[offset++];
}
packetlen <<= 8;
packetlen = data[offset++];
}
- switch (data[offset]) {
+ switch (data[offset] & 0x7F) {
case 2:
/*
* Signature creation time. Might want to output this?
*/
break;
case 2:
/*
* Signature creation time. Might want to output this?
*/
break;
/*
* Signature expiration time. Might want to output this?
*/
/*
* Signature expiration time. Might want to output this?
*/
default:
/*
* We don't care about unrecognized packets unless bit
default:
/*
* We don't care about unrecognized packets unless bit
- * 7 is set in which case we prefer an error than
- * ignoring it.
+ * 7 is set in which case we log a major error.
- assert(!(data[offset] & 0x80));
+ if (data[offset] & 0x80) {
+ logthing(LOGTHING_CRITICAL,
+ "Critical subpacket type not parsed: 0x%X",
+ data[offset]);
+ }
+