]> the.earth.li Git - onak.git/commitdiff
Add some more subpacket types to key decoder
authorJonathan McDowell <noodles@earth.li>
Tue, 12 Nov 2013 05:46:16 +0000 (21:46 -0800)
committerJonathan McDowell <noodles@earth.li>
Tue, 12 Nov 2013 05:46:16 +0000 (21:46 -0800)
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.

decodekey.c
openpgp.h

index 705b827d43ef7a7e69197a9a4dd9af537e81d542..57a1e660754b1a7adf79284d028f248d23416b6d 100644 (file)
@@ -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
index f78f10c320e65ac13958feb7128ee029252bc8cb..7196e953b43ec0ed29fcea5ded45968dc60e4bd7 100644 (file)
--- a/openpgp.h
+++ b/openpgp.h
 #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__ */