mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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 <gniibe@fsij.org>
This commit is contained in:
parent
44621120a2
commit
58e6990eaa
@ -2062,6 +2062,10 @@ app_auth (card_t card, ctrl_t ctrl, const char *keyidstr,
|
|||||||
err = gpg_error (GPG_ERR_UNSUPPORTED_OPERATION);
|
err = gpg_error (GPG_ERR_UNSUPPORTED_OPERATION);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (card->app->apptype != APPTYPE_OPENPGP
|
||||||
|
&& (!indata || !indatalen))
|
||||||
|
return gpg_error (GPG_ERR_INV_VALUE);
|
||||||
|
|
||||||
if (DBG_APP)
|
if (DBG_APP)
|
||||||
log_debug ("slot %d app %s: calling auth(%s)\n",
|
log_debug ("slot %d app %s: calling auth(%s)\n",
|
||||||
card->slot, xstrapptype (card->app), keyidstr);
|
card->slot, xstrapptype (card->app), keyidstr);
|
||||||
|
@ -1133,10 +1133,9 @@ cmd_pkauth (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rc = assuan_send_data (ctx, outdata, outdatalen);
|
if (!challenge_response)
|
||||||
|
rc = assuan_send_data (ctx, outdata, outdatalen);
|
||||||
xfree (outdata);
|
xfree (outdata);
|
||||||
if (rc)
|
|
||||||
return rc; /* that is already an assuan error code */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user