mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
scd: Use Gcrypt usage constants for the do_with_keygrip capabilities.
* scd/command.c (cmd_keyinfo): Use Gcrypt constants for CAP. * scd/app-openpgp.c (do_with_keygrip): Adjust for them. * scd/app-piv.c (do_with_keygrip): Ditto. -- That makes it easier to read. An open question is whether we should allow several capabilities and whether they are the ORed or ANDed. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2ccbcfec12
commit
5b7b42e2b2
3 changed files with 17 additions and 8 deletions
|
@ -2077,11 +2077,11 @@ cmd_keyinfo (assuan_context_t ctx, char *line)
|
|||
if (has_option (line, "--list"))
|
||||
cap = 0;
|
||||
else if (has_option (line, "--list=sign"))
|
||||
cap = 1;
|
||||
cap = GCRY_PK_USAGE_SIGN;
|
||||
else if (has_option (line, "--list=encr"))
|
||||
cap = 2;
|
||||
cap = GCRY_PK_USAGE_ENCR;
|
||||
else if (has_option (line, "--list=auth"))
|
||||
cap = 3;
|
||||
cap = GCRY_PK_USAGE_AUTH;
|
||||
else
|
||||
keygrip_str = line;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue