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:
parent
aa3d02ee5b
commit
cc99c37549
18 changed files with 222 additions and 134 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue