diff --git a/src/libopensc/iso7816.c b/src/libopensc/iso7816.c index 6d439641..90742b93 100644 --- a/src/libopensc/iso7816.c +++ b/src/libopensc/iso7816.c @@ -522,23 +522,6 @@ static int iso7816_get_challenge(sc_card_t *card, u8 *rnd, size_t len) return 0; } -/* This belongs to ETSI TS 101 206-3, not to ISO 7816. */ -static int iso7816_give_random(sc_card_t *card, u8 *rnd, size_t len) -{ - int r; - sc_apdu_t apdu; - - sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, - 0x86, 0x00, 0x00); - apdu.cla = 0x80; - apdu.data = rnd; - apdu.lc = apdu.datalen = len; - - r = sc_transmit_apdu(card, &apdu); - SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, r, "APDU transmit failed"); - return sc_check_sw(card, apdu.sw1, apdu.sw2); -} - static int iso7816_construct_fci(sc_card_t *card, const sc_file_t *file, u8 *out, size_t *outlen) { @@ -1020,7 +1003,6 @@ static struct sc_card_operations iso_ops = { iso7816_select_file, iso7816_get_response, iso7816_get_challenge, - iso7816_give_random, NULL, /* verify */ NULL, /* logout */ iso7816_restore_security_env, diff --git a/src/libopensc/opensc.h b/src/libopensc/opensc.h index 35667e71..e633910a 100644 --- a/src/libopensc/opensc.h +++ b/src/libopensc/opensc.h @@ -442,8 +442,6 @@ struct sc_card_operations { struct sc_file **file_out); int (*get_response)(struct sc_card *card, size_t *count, u8 *buf); int (*get_challenge)(struct sc_card *card, u8 * buf, size_t count); - /* This belongs to ETSI TS 101 206-3, not to ISO 7816. */ - int (*give_random)(struct sc_card *card, u8 * buf, size_t count); /* * ISO 7816-8 functions