1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* keygen.c (do_add_key_flags, parse_parameter_usage): Add support

the proposed AUTH key flag.
* getkey.c (fixup_uidnode, merge_selfsigs_main)
(merge_selfsigs_subkey, premerge_public_with_secret): Ditto.
* keylist.c (print_capabilities): Ditto.

* parse-packet.c (parse_key): Allow to parse the divert-to-card
S2K mode.
* build-packet.c (do_secret_key): Handle divert-to-card S2K
* seckey-cert.c (is_secret_key_protected): Ditto.
(check_secret_key): Ditto.

* keygen.c (do_ask_passphrase): Renamed from ask_passphrase.
* passphrase.c (ask_passphrase): New.
This commit is contained in:
Werner Koch 2003-09-30 08:00:08 +00:00
parent 4b929ff36d
commit 8062cb418a
13 changed files with 193 additions and 38 deletions

View file

@ -475,11 +475,14 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
if( pk? pk->is_primary : sk->is_primary )
putchar ('c');
}
if ( (use & PUBKEY_USAGE_AUTH) )
putchar ('a');
}
if ( keyblock ) { /* figure out the usable capabilities */
KBNODE k;
int enc=0, sign=0, cert=0, disabled=0;
int enc=0, sign=0, cert=0, auth=0, disabled=0;
for (k=keyblock; k; k = k->next ) {
if ( k->pkt->pkttype == PKT_PUBLIC_KEY
@ -498,6 +501,8 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
if(pk->is_primary)
cert = 1;
}
if ( (pk->pubkey_usage & PUBKEY_USAGE_AUTH) )
auth = 1;
}
}
else if ( k->pkt->pkttype == PKT_SECRET_KEY
@ -513,6 +518,8 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
if(sk->is_primary)
cert = 1;
}
if ( (sk->pubkey_usage & PUBKEY_USAGE_AUTH) )
auth = 1;
}
}
}
@ -522,6 +529,8 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock)
putchar ('S');
if (cert)
putchar ('C');
if (auth)
putchar ('A');
if (disabled)
putchar ('D');
}