aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-10-20 11:33:50 +0000
committerWerner Koch <[email protected]>2010-10-20 11:33:50 +0000
commitcc99c375491c88e85190c25648419a8e627b08f6 (patch)
tree5cb3eda1226608f68e398a6a7f007f8381127dde /g10/parse-packet.c
parentInstall the mo files on W32 platforms (diff)
downloadgnupg-cc99c375491c88e85190c25648419a8e627b08f6.tar.gz
gnupg-cc99c375491c88e85190c25648419a8e627b08f6.zip
Make public key data structure easier to read.
Check vor v1 card while signing.
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r--g10/parse-packet.c4
1 files changed, 2 insertions, 2 deletions
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;