Use new applet selection format.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -80,20 +80,16 @@ extern int cmd_bip_slip();
|
|||||||
|
|
||||||
extern const uint8_t *ccid_atr;
|
extern const uint8_t *ccid_atr;
|
||||||
|
|
||||||
app_t *sc_hsm_select_aid(app_t *a, const uint8_t *aid, uint8_t aid_len) {
|
int sc_hsm_select_aid(app_t *a) {
|
||||||
if (!memcmp(aid, sc_hsm_aid + 1, MIN(aid_len, sc_hsm_aid[0]))) {
|
a->process_apdu = sc_hsm_process_apdu;
|
||||||
a->aid = sc_hsm_aid;
|
a->unload = sc_hsm_unload;
|
||||||
a->process_apdu = sc_hsm_process_apdu;
|
init_sc_hsm();
|
||||||
a->unload = sc_hsm_unload;
|
return CCID_OK;
|
||||||
init_sc_hsm();
|
|
||||||
return a;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __attribute__((constructor)) sc_hsm_ctor() {
|
void __attribute__((constructor)) sc_hsm_ctor() {
|
||||||
ccid_atr = atr_sc_hsm;
|
ccid_atr = atr_sc_hsm;
|
||||||
register_app(sc_hsm_select_aid);
|
register_app(sc_hsm_select_aid, sc_hsm_aid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void scan_files() {
|
void scan_files() {
|
||||||
|
|||||||
Reference in New Issue
Block a user