diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-03-03 09:45:49 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-03-03 09:45:49 +0100 |
commit | 44621120a269ba67408fe1ea067af8cbd1cbb35e (patch) | |
tree | e3933c6c5f69a9cceda3f924911f0a0627d8faad /scd/app.c | |
parent | g10/encrypt: use iobuf_copy instead of manual iobuf_read/iobuf_write (diff) | |
download | gnupg2-44621120a269ba67408fe1ea067af8cbd1cbb35e.tar.xz gnupg2-44621120a269ba67408fe1ea067af8cbd1cbb35e.zip |
scd: Add --challenge-response option to PK_AUTH for OpenPGP card.
* scd/app-openpgp.c (rmd160_prefix, sha1_prefix, sha224_prefix)
(sha256_prefix, sha384_prefix, sha512_prefix): Move the scope up.
(gen_challenge): New.
(do_auth): Support challenge-response check if it signs correctly.
* scd/app.c (app_auth): Remove the check INDATA and INDATALEN.
* scd/command.c (cmd_pkauth): Support --challenge-response option.
--
GnuPG-bug-id: 5862
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'scd/app.c')
-rw-r--r-- | scd/app.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2053,7 +2053,7 @@ app_auth (card_t card, ctrl_t ctrl, const char *keyidstr, { gpg_error_t err; - if (!indata || !indatalen || !outdata || !outdatalen || !pincb) + if (!outdata || !outdatalen || !pincb) return gpg_error (GPG_ERR_INV_VALUE); if ((err = maybe_switch_app (ctrl, card, keyidstr))) |