diff --git a/npa/src/npa.c b/npa/src/npa.c index 08eb16b..73f06e6 100644 --- a/npa/src/npa.c +++ b/npa/src/npa.c @@ -1252,9 +1252,16 @@ int EstablishPACEChannel(struct sm_ctx *oldnpactx, sc_card_t *card, goto err; } } + bin_log(card->ctx, SC_LOG_DEBUG_NORMAL, "EF.CardAccess", pace_output->ef_cardaccess, pace_output->ef_cardaccess_length); + /* XXX Card capabilities should be determined by the OpenSC card driver. We + * set it here to be able to use the nPA without patching OpenSC. By + * now we have read the EF.CardAccess so the assumption to have an nPA + * seems valid. */ + card->caps |= SC_CARD_CAP_APDU_EXT; + eac_ctx = EAC_CTX_new(); if (!eac_ctx || !EAC_CTX_init_ef_cardaccess(pace_output->ef_cardaccess,