diff options
author | Werner Koch <wk@gnupg.org> | 2020-04-02 11:54:01 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-04-02 11:54:01 +0200 |
commit | 5b7b42e2b2b7ba7b88f89ff4b4ee7baf0eef2a04 (patch) | |
tree | 627c06b4e84307688672d53ce8c0a3dd4263e414 /scd/command.c | |
parent | scd: New command DEVINFO. (diff) | |
download | gnupg2-5b7b42e2b2b7ba7b88f89ff4b4ee7baf0eef2a04.tar.xz gnupg2-5b7b42e2b2b7ba7b88f89ff4b4ee7baf0eef2a04.zip |
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>
Diffstat (limited to 'scd/command.c')
-rw-r--r-- | scd/command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scd/command.c b/scd/command.c index 159c6f2dc..98095f259 100644 --- a/scd/command.c +++ b/scd/command.c @@ -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; |