1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Make public key data structure easier to read.

Check vor v1 card while signing.
This commit is contained in:
Werner Koch 2010-10-20 11:33:50 +00:00
parent aa3d02ee5b
commit cc99c37549
18 changed files with 222 additions and 134 deletions

View file

@ -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;