1
0
Fork 0
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:
Werner Koch 2020-04-02 11:54:01 +02:00
parent 2ccbcfec12
commit 5b7b42e2b2
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 17 additions and 8 deletions

View file

@ -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;