diff options
author | Werner Koch <wk@gnupg.org> | 2003-09-05 09:40:18 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2003-09-05 09:40:18 +0200 |
commit | 3598504854fd5f2709c35ea5075184a0a253ef50 (patch) | |
tree | 9b1bb7d6a3db043cfb6eb28e69ddadc28c186c6a /g10/keylist.c | |
parent | * configure.ac (HAVE_LIBUSB): Added a simple test for libusb. (diff) | |
download | gnupg2-3598504854fd5f2709c35ea5075184a0a253ef50.tar.xz gnupg2-3598504854fd5f2709c35ea5075184a0a253ef50.zip |
* keygen.c (do_add_key_flags, parse_parameter_usage)
(do_generate_keypair): 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.
Diffstat (limited to 'g10/keylist.c')
-rw-r--r-- | g10/keylist.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index b5549fb47..081782785 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -405,20 +405,23 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock) { unsigned int use = pk? pk->pubkey_usage : sk->pubkey_usage; - if ( use & PUBKEY_USAGE_ENC ) + if ( (use & PUBKEY_USAGE_ENC) ) putchar ('e'); - if ( use & PUBKEY_USAGE_SIG ) + if ( (use & PUBKEY_USAGE_SIG) ) { putchar ('s'); 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 @@ -429,14 +432,16 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock) disabled=pk_is_disabled(pk); if ( pk->is_valid && !pk->is_revoked && !pk->has_expired ) { - if ( pk->pubkey_usage & PUBKEY_USAGE_ENC ) + if ( (pk->pubkey_usage & PUBKEY_USAGE_ENC) ) enc = 1; - if ( pk->pubkey_usage & PUBKEY_USAGE_SIG ) + if ( (pk->pubkey_usage & PUBKEY_USAGE_SIG) ) { sign = 1; if(pk->is_primary) cert = 1; } + if ( (pk->pubkey_usage & PUBKEY_USAGE_AUTH) ) + auth = 1; } } else if ( k->pkt->pkttype == PKT_SECRET_KEY @@ -444,14 +449,16 @@ print_capabilities (PKT_public_key *pk, PKT_secret_key *sk, KBNODE keyblock) sk = k->pkt->pkt.secret_key; if ( sk->is_valid && !sk->is_revoked && !sk->has_expired && sk->protect.s2k.mode!=1001 ) { - if ( sk->pubkey_usage & PUBKEY_USAGE_ENC ) + if ( (sk->pubkey_usage & PUBKEY_USAGE_ENC) ) enc = 1; - if ( sk->pubkey_usage & PUBKEY_USAGE_SIG ) + if ( (sk->pubkey_usage & PUBKEY_USAGE_SIG) ) { sign = 1; if(sk->is_primary) cert = 1; } + if ( (sk->pubkey_usage & PUBKEY_USAGE_AUTH) ) + auth = 1; } } } @@ -461,6 +468,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'); } |