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

Add configure option --disable-ccid-driver

This commit is contained in:
Werner Koch 2010-03-09 09:55:24 +00:00
parent 32c979559f
commit c064a69df5
4 changed files with 40 additions and 13 deletions

View file

@ -415,12 +415,15 @@ hash_for(PKT_secret_key *sk)
return match_dsa_hash(qbytes);
}
else if (sk->is_protected && sk->protect.s2k.mode==1002)
else if (sk->is_protected && sk->protect.s2k.mode == 1002
&& sk->protect.ivlen == 16
&& !memcmp (sk->protect.iv, "\xD2\x76\x00\x01\x24\x01\x01", 7))
{
/* The sk lives on a smartcard, and current smartcards only
handle SHA-1 and RIPEMD/160. This is correct now, but may
need revision as the cards add algorithms. */
/* The sk lives on a smartcard, and old smartcards only handle
SHA-1 and RIPEMD/160. Newer smartcards (v2.0) don't have
this restriction anymore. Fortunately the serial number
encodes the version of the card and thus we know that this
key is on a v1 card. */
if(opt.personal_digest_prefs)
{
prefitem_t *prefs;