diff options
author | NIIBE Yutaka <[email protected]> | 2022-03-04 01:11:38 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-03-04 01:11:38 +0000 |
commit | 58e6990eaabb7302cc8cc979378e6fffe36459b7 (patch) | |
tree | 08585b93bfdd753c9e0ce681d5cc61acc158edd9 /scd/app.c | |
parent | scd: Add --challenge-response option to PK_AUTH for OpenPGP card. (diff) | |
download | gnupg-58e6990eaabb7302cc8cc979378e6fffe36459b7.tar.gz gnupg-58e6990eaabb7302cc8cc979378e6fffe36459b7.zip |
scd: Fix PK_AUTH with --challenge-response option.
* scd/app.c (app_auth): It's only APPTYPE_OPENPGP which supports
the challenge response interaction.
* scd/command.c (cmd_pkauth): It only wants if it works or not.
--
GnuPG-bug-id: 5862
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/app.c')
-rw-r--r-- | scd/app.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2062,6 +2062,10 @@ app_auth (card_t card, ctrl_t ctrl, const char *keyidstr, err = gpg_error (GPG_ERR_UNSUPPORTED_OPERATION); else { + if (card->app->apptype != APPTYPE_OPENPGP + && (!indata || !indatalen)) + return gpg_error (GPG_ERR_INV_VALUE); + if (DBG_APP) log_debug ("slot %d app %s: calling auth(%s)\n", card->slot, xstrapptype (card->app), keyidstr); |