From cc99c375491c88e85190c25648419a8e627b08f6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 20 Oct 2010 11:33:50 +0000 Subject: Make public key data structure easier to read. Check vor v1 card while signing. --- g10/parse-packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g10/parse-packet.c') diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 89d6f5958..3714739d4 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1901,7 +1901,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen, pk->max_expiredate = max_expiredate; pk->hdrbytes = hdrlen; pk->version = version; - pk->is_primary = (pkttype == PKT_PUBLIC_KEY || pkttype == PKT_SECRET_KEY); + pk->flags.primary = (pkttype == PKT_PUBLIC_KEY || pkttype == PKT_SECRET_KEY); pk->pubkey_algo = algorithm; nskey = pubkey_get_nskey (algorithm); @@ -2085,7 +2085,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen, } snlen = iobuf_get (inp); pktlen--; - if (pktlen < snlen || snlen == -1) + if (pktlen < snlen || snlen == (size_t)(-1)) { err = gpg_error (GPG_ERR_INV_PACKET); goto leave; -- cgit