diff options
author | Werner Koch <[email protected]> | 2016-06-20 21:58:16 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-06-20 21:59:18 +0000 |
commit | 955baf04364721457cd99aad21942523cd50498c (patch) | |
tree | 1d1746bde9fd38230261943f1c870eea9dc58dbd /g10/parse-packet.c | |
parent | gpg: New option --rfc4880bis. (diff) | |
download | gnupg-955baf04364721457cd99aad21942523cd50498c.tar.gz gnupg-955baf04364721457cd99aad21942523cd50498c.zip |
gpg: Add experimental support for an issuer fpr.
* common/openpgpdefs.h (SIGSUBPKT_ISSUER_FPR): New.
* g10/build-packet.c (build_sig_subpkt_from_sig): Add arg PKSK and
insert the issuer fpr if needed.
* g10/sign.c (write_signature_packets): Pass signing key.
(make_keysig_packet): Ditto.
(update_keysig_packet): Ditto.
* g10/parse-packet.c (dump_sig_subpkt): Print issuer fpr.
(parse_one_sig_subpkt): Detect issuer fpr.
(can_handle_critical): Add issuer fpr.
* g10/mainproc.c (check_sig_and_print): Try to get key via fingerprint.
* g10/gpgv.c (keyserver_import_fprint): New stub.
* g10/test-stubs.c (keyserver_import_fprint): New stub.
--
This support is enabled with the --rfc4880bis option and intended to
test to recently proposed issuer fpr.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r-- | g10/parse-packet.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c index e02238bfd..1c1b389d8 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1335,6 +1335,19 @@ dump_sig_subpkt (int hashed, int type, int critical, (ulong) buf32_to_u32 (buffer), (ulong) buf32_to_u32 (buffer + 4)); break; + case SIGSUBPKT_ISSUER_FPR: + if (length >= 21) + { + char *tmp; + es_fprintf (listfp, "issuer fpr v%d ", buffer[0]); + tmp = bin2hex (buffer+1, length-1, NULL); + if (tmp) + { + es_fputs (tmp, listfp); + xfree (tmp); + } + } + break; case SIGSUBPKT_NOTATION: { es_fputs ("notation: ", listfp); @@ -1485,6 +1498,10 @@ parse_one_sig_subpkt (const byte * buffer, size_t n, int type) if (n < 8) break; return 0; + case SIGSUBPKT_ISSUER_FPR: /* issuer key ID */ + if (n < 21) + break; + return 0; case SIGSUBPKT_NOTATION: /* minimum length needed, and the subpacket must be well-formed where the name length and value length all fit inside the @@ -1543,6 +1560,7 @@ can_handle_critical (const byte * buffer, size_t n, int type) case SIGSUBPKT_REVOCABLE: case SIGSUBPKT_REV_KEY: case SIGSUBPKT_ISSUER: /* issuer key ID */ + case SIGSUBPKT_ISSUER_FPR: /* issuer fingerprint */ case SIGSUBPKT_PREF_SYM: case SIGSUBPKT_PREF_HASH: case SIGSUBPKT_PREF_COMPR: |