From: Jonathan McDowell Date: Tue, 12 Nov 2013 05:46:16 +0000 (-0800) Subject: Add some more subpacket types to key decoder X-Git-Tag: onak-0.4.3~26 X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=commitdiff_plain;h=df44563877c4ae07ac62a65c9dee79250a3a779a Add some more subpacket types to key decoder Observed in keys sent to the keyserver and taken from either RFC 4880 or the source of various older PGP implementations. Some of these are legacy but we can identify and ignore them. --- diff --git a/decodekey.c b/decodekey.c index 705b827..57a1e66 100644 --- a/decodekey.c +++ b/decodekey.c @@ -109,15 +109,28 @@ int parse_subpackets(unsigned char *data, uint64_t *keyid, time_t *creation) case OPENPGP_SIGSUB_EXPORTABLE: case OPENPGP_SIGSUB_TRUSTSIG: case OPENPGP_SIGSUB_REGEX: + case OPENPGP_SIGSUB_REVOCABLE: + case OPENPGP_SIGSUB_CAPABILITIES: case OPENPGP_SIGSUB_KEYEXPIRY: + case OPENPGP_SIGSUB_ARR: case OPENPGP_SIGSUB_PREFSYM: + case OPENPGP_SIGSUB_REVOCATION_KEY: + case OPENPGP_SIGSUB_ISSUER_UID: + case OPENPGP_SIGSUB_URL: + case OPENPGP_SIGSUB_ISSUER_FINGER: case OPENPGP_SIGSUB_NOTATION: case OPENPGP_SIGSUB_PREFHASH: case OPENPGP_SIGSUB_PREFCOMPRESS: case OPENPGP_SIGSUB_KEYSERVER: + case OPENPGP_SIGSUB_PREFKEYSERVER: case OPENPGP_SIGSUB_PRIMARYUID: case OPENPGP_SIGSUB_POLICYURI: case OPENPGP_SIGSUB_KEYFLAGS: + case OPENPGP_SIGSUB_SIGNER_UID: + case OPENPGP_SIGSUB_REVOKE_REASON: + case OPENPGP_SIGSUB_FEATURES: + case OPENPGP_SIGSUB_SIGNATURE_TARGET: + case OPENPGP_SIGSUB_EMBEDDED_SIG: /* * Various subpacket types we know about, but don't * currently handle. Some are candidates for being diff --git a/openpgp.h b/openpgp.h index f78f10c..7196e95 100644 --- a/openpgp.h +++ b/openpgp.h @@ -92,15 +92,28 @@ #define OPENPGP_SIGSUB_EXPORTABLE 4 #define OPENPGP_SIGSUB_TRUSTSIG 5 #define OPENPGP_SIGSUB_REGEX 6 +#define OPENPGP_SIGSUB_REVOCABLE 7 +#define OPENPGP_SIGSUB_CAPABILITIES 8 /* Legacy */ #define OPENPGP_SIGSUB_KEYEXPIRY 9 +#define OPENPGP_SIGSUB_ARR 10 /* Placeholder in RFC */ #define OPENPGP_SIGSUB_PREFSYM 11 +#define OPENPGP_SIGSUB_REVOCATION_KEY 12 #define OPENPGP_SIGSUB_ISSUER 16 +#define OPENPGP_SIGSUB_ISSUER_UID 17 /* Legacy */ +#define OPENPGP_SIGSUB_URL 18 /* Legacy */ +#define OPENPGP_SIGSUB_ISSUER_FINGER 19 /* Legacy */ #define OPENPGP_SIGSUB_NOTATION 20 #define OPENPGP_SIGSUB_PREFHASH 21 #define OPENPGP_SIGSUB_PREFCOMPRESS 22 #define OPENPGP_SIGSUB_KEYSERVER 23 +#define OPENPGP_SIGSUB_PREFKEYSERVER 24 #define OPENPGP_SIGSUB_PRIMARYUID 25 #define OPENPGP_SIGSUB_POLICYURI 26 #define OPENPGP_SIGSUB_KEYFLAGS 27 +#define OPENPGP_SIGSUB_SIGNER_UID 28 +#define OPENPGP_SIGSUB_REVOKE_REASON 29 +#define OPENPGP_SIGSUB_FEATURES 30 +#define OPENPGP_SIGSUB_SIGNATURE_TARGET 31 +#define OPENPGP_SIGSUB_EMBEDDED_SIG 32 #endif /* __OPENPGP_H__ */