mirror of git://git.gnupg.org/gnupg.git
scd: Fix check_application_conflict.
* scd/scd/app.c (check_application_conflict): Compare APPTYPE.
Fixes-commit: 5a5288d051
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
8dc19d35e8
commit
6fae96094c
|
@ -275,6 +275,8 @@ check_application_conflict (card_t card, const char *name,
|
|||
const unsigned char *serialno_bin,
|
||||
size_t serialno_bin_len)
|
||||
{
|
||||
apptype_t apptype;
|
||||
|
||||
if (!card || !name)
|
||||
return 0;
|
||||
if (!card->app)
|
||||
|
@ -287,6 +289,10 @@ check_application_conflict (card_t card, const char *name,
|
|||
return 0; /* The card does not match the requested S/N. */
|
||||
}
|
||||
|
||||
apptype = apptype_from_name (name);
|
||||
if (card->app->apptype == apptype)
|
||||
return 0;
|
||||
|
||||
if (card->app->apptype == APPTYPE_UNDEFINED)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue