scd:p15: Support for GeNUA cards.

* scd/app-p15.c (read_p15_info): Disable extended mode for Genua
cards.
This commit is contained in:
Werner Koch 2022-04-11 17:48:45 +02:00
parent 29fd805818
commit 44ec383cde
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 10 additions and 1 deletions

View File

@ -456,7 +456,7 @@ struct app_local_s
/* The vendor's product. */
card_product_t card_product;
/* Flag indicating that extedned_mode is not supported. */
/* Flag indicating that extended_mode is not supported. */
unsigned int no_extended_mode : 1;
/* Flag indicating whether we may use direct path selection. */
@ -3570,6 +3570,15 @@ read_p15_info (app_t app)
release_lists (app);
if (IS_CARDOS_5 (app)
&& app->app_local->manufacturer_id
&& !ascii_strcasecmp (app->app_local->manufacturer_id, "GeNUA mbH")
&& !app->app_local->no_extended_mode)
{
log_info ("p15: disabling extended mode based on TokenInfo\n");
app->app_local->no_extended_mode = 1;
}
/* Read the ODF so that we know the location of all directory
files. */
/* Fixme: We might need to get a non-standard ODF FID from TokenInfo. */