From 1b5d5c7ecbea49828846a945e53a037e31435446 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Sat, 2 Aug 2003 20:56:46 +0000 Subject: [PATCH] * parse-packet.c (parse_signature): Don't give "signature packet without xxxx" warnings for experimental pk algorithms. An experimental algorithm may not have a notion of (for example) a keyid (i.e. PGP's x.509 stuff). --- g10/ChangeLog | 7 +++++++ g10/parse-packet.c | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index fed22591f..a73f88836 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +2003-08-02 David Shaw + + * parse-packet.c (parse_signature): Don't give "signature packet + without xxxx" warnings for experimental pk algorithms. An + experimental algorithm may not have a notion of (for example) a + keyid (i.e. PGP's x.509 stuff). + 2003-07-31 Stefan Bellon * gpgv.c [read_trust_options]: Removed trailing semicolon to avoid diff --git a/g10/parse-packet.c b/g10/parse-packet.c index f2ace1322..aafe3356c 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1273,17 +1273,19 @@ parse_signature( IOBUF inp, int pkttype, unsigned long pktlen, } p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_SIG_CREATED, NULL ); - if( !p ) - log_error("signature packet without timestamp\n"); - else - sig->timestamp = buffer_to_u32(p); + if(p) + sig->timestamp = buffer_to_u32(p); + else if(!(sig->pubkey_algo>=100 && sig->pubkey_algo<=110)) + log_error("signature packet without timestamp\n"); + p = parse_sig_subpkt2( sig, SIGSUBPKT_ISSUER, NULL ); - if( !p ) - log_error("signature packet without keyid\n"); - else { + if(p) + { sig->keyid[0] = buffer_to_u32(p); sig->keyid[1] = buffer_to_u32(p+4); - } + } + else if(!(sig->pubkey_algo>=100 && sig->pubkey_algo<=110)) + log_error("signature packet without keyid\n"); p=parse_sig_subpkt(sig->hashed,SIGSUBPKT_SIG_EXPIRE,NULL); if(p)