From e226ad265ab8277362a35995b68b5472e548e9c0 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Tue, 26 Jun 2018 10:15:22 +0200 Subject: [PATCH] Removed unused option `hide_empty_tokens` --- etc/opensc.conf.in | 9 --------- src/pkcs11/misc.c | 8 +++----- src/pkcs11/sc-pkcs11.h | 1 - 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/etc/opensc.conf.in b/etc/opensc.conf.in index aa595687..b7fd7d63 100644 --- a/etc/opensc.conf.in +++ b/etc/opensc.conf.in @@ -1001,15 +1001,6 @@ app opensc-pkcs11 { # (max_virtual_slots/slots_per_card) limits the number of readers # that can be used on the system. Default is then 16/4=4 readers. - # Normally, the pkcs11 module will create - # the full number of slots defined above by - # num_slots. If there are fewer pins/keys on - # the card, the remaining keys will be empty - # (and you will be able to create new objects - # within them). - # Default: true - # hide_empty_tokens = false; - # By default, the OpenSC PKCS#11 module will not lock your card # once you authenticate to the card via C_Login. # diff --git a/src/pkcs11/misc.c b/src/pkcs11/misc.c index bb319771..ab77c0cb 100644 --- a/src/pkcs11/misc.c +++ b/src/pkcs11/misc.c @@ -452,7 +452,6 @@ void load_pkcs11_parameters(struct sc_pkcs11_config *conf, sc_context_t * ctx) } else { conf->slots_per_card = 4; } - conf->hide_empty_tokens = 1; conf->atomic = 0; conf->lock_login = 0; conf->init_sloppy = 1; @@ -467,7 +466,6 @@ void load_pkcs11_parameters(struct sc_pkcs11_config *conf, sc_context_t * ctx) /* contains the defaults, if there is a "pkcs11" config block */ conf->max_virtual_slots = scconf_get_int(conf_block, "max_virtual_slots", conf->max_virtual_slots); conf->slots_per_card = scconf_get_int(conf_block, "slots_per_card", conf->slots_per_card); - conf->hide_empty_tokens = scconf_get_bool(conf_block, "hide_empty_tokens", conf->hide_empty_tokens); conf->atomic = scconf_get_bool(conf_block, "atomic", conf->atomic); if (conf->atomic) conf->lock_login = 1; @@ -497,12 +495,12 @@ void load_pkcs11_parameters(struct sc_pkcs11_config *conf, sc_context_t * ctx) conf->create_slots_flags |= SC_PKCS11_SLOT_CREATE_ALL; op = strtok(NULL, " ,"); } - free(tmp); + free(tmp); sc_log(ctx, "PKCS#11 options: max_virtual_slots=%d slots_per_card=%d " - "hide_empty_tokens=%d lock_login=%d atomic=%d pin_unblock_style=%d " + "lock_login=%d atomic=%d pin_unblock_style=%d " "create_slots_flags=0x%X", conf->max_virtual_slots, conf->slots_per_card, - conf->hide_empty_tokens, conf->lock_login, conf->atomic, conf->pin_unblock_style, + conf->lock_login, conf->atomic, conf->pin_unblock_style, conf->create_slots_flags); } diff --git a/src/pkcs11/sc-pkcs11.h b/src/pkcs11/sc-pkcs11.h index c023ee86..84324588 100644 --- a/src/pkcs11/sc-pkcs11.h +++ b/src/pkcs11/sc-pkcs11.h @@ -71,7 +71,6 @@ struct sc_pkcs11_config { unsigned int plug_and_play; unsigned int max_virtual_slots; unsigned int slots_per_card; - unsigned char hide_empty_tokens; unsigned char lock_login; unsigned char atomic; unsigned char init_sloppy;