always declare extended length capabilities
allows usage of an unpatched version of OpenPACE. libnpa now works with the nPA using the default card driver.
This commit is contained in:
@@ -1252,9 +1252,16 @@ int EstablishPACEChannel(struct sm_ctx *oldnpactx, sc_card_t *card,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bin_log(card->ctx, SC_LOG_DEBUG_NORMAL, "EF.CardAccess", pace_output->ef_cardaccess,
|
bin_log(card->ctx, SC_LOG_DEBUG_NORMAL, "EF.CardAccess", pace_output->ef_cardaccess,
|
||||||
pace_output->ef_cardaccess_length);
|
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();
|
eac_ctx = EAC_CTX_new();
|
||||||
if (!eac_ctx
|
if (!eac_ctx
|
||||||
|| !EAC_CTX_init_ef_cardaccess(pace_output->ef_cardaccess,
|
|| !EAC_CTX_init_ef_cardaccess(pace_output->ef_cardaccess,
|
||||||
|
|||||||
Reference in New Issue
Block a user