mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
scd: Improve app selection for app "undefined".
* scd/app.c (app_new_register): Don't bail out early in undefined mode. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
c9f4c1f0de
commit
0415b80227
18
scd/app.c
18
scd/app.c
@ -305,21 +305,27 @@ app_new_register (int slot, ctrl_t ctrl, const char *name,
|
||||
}
|
||||
}
|
||||
|
||||
/* For certain error codes, there is no need to try more. */
|
||||
if (gpg_err_code (err) == GPG_ERR_CARD_NOT_PRESENT
|
||||
|| gpg_err_code (err) == GPG_ERR_ENODEV)
|
||||
goto leave;
|
||||
|
||||
/* Figure out the application to use. */
|
||||
if (want_undefined)
|
||||
{
|
||||
/* We switch to the "undefined" application only if explicitly
|
||||
requested. */
|
||||
app->apptype = "UNDEFINED";
|
||||
/* Clear the error so that we don't run through the application
|
||||
* selection chain. */
|
||||
err = 0;
|
||||
}
|
||||
else
|
||||
err = gpg_error (GPG_ERR_NOT_FOUND);
|
||||
{
|
||||
/* For certain error codes, there is no need to try more. */
|
||||
if (gpg_err_code (err) == GPG_ERR_CARD_NOT_PRESENT
|
||||
|| gpg_err_code (err) == GPG_ERR_ENODEV)
|
||||
goto leave;
|
||||
|
||||
/* Set a default error so that we run through the application
|
||||
* selecion chain. */
|
||||
err = gpg_error (GPG_ERR_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (err && is_app_allowed ("openpgp")
|
||||
&& (!name || !strcmp (name, "openpgp")))
|
||||
|
Loading…
x
Reference in New Issue
Block a user