Home
last modified time | relevance | path

Searched refs:apdu (Results 1 – 4 of 4) sorted by relevance

/freebsd/contrib/libfido2/src/
H A Diso7816.c13 iso7816_apdu_t *apdu; in iso7816_new() local
17 if ((apdu = calloc(1, alloc_len)) == NULL) in iso7816_new()
19 apdu->alloc_len = alloc_len; in iso7816_new()
20 apdu->payload_len = payload_len; in iso7816_new()
21 apdu->payload_ptr = apdu->payload; in iso7816_new()
22 apdu->header.cla = cla; in iso7816_new()
23 apdu->header.ins = ins; in iso7816_new()
24 apdu->header.p1 = p1; in iso7816_new()
25 apdu->header.lc2 = (uint8_t)((payload_len >> 8) & 0xff); in iso7816_new()
26 apdu->header.lc3 = (uint8_t)(payload_len & 0xff); in iso7816_new()
[all …]
H A Dnfc.c25 uint8_t apdu[5 + UINT8_MAX + 1]; in tx_short_apdu() local
30 memset(&apdu, 0, sizeof(apdu)); in tx_short_apdu()
31 apdu[0] = h->cla | cla_flags; in tx_short_apdu()
32 apdu[1] = h->ins; in tx_short_apdu()
33 apdu[2] = h->p1; in tx_short_apdu()
34 apdu[3] = h->p2; in tx_short_apdu()
35 apdu[4] = payload_len; in tx_short_apdu()
36 memcpy(&apdu[5], payload, payload_len); in tx_short_apdu()
39 if (d->io.write(d->io_handle, apdu, apdu_len) < 0) { in tx_short_apdu()
57 explicit_bzero(apdu, sizeof(apdu)); in tx_short_apdu()
[all …]
H A Du2f.c147 iso7816_apdu_t *apdu = NULL; in send_dummy_register() local
157 if ((apdu = iso7816_new(0, U2F_CMD_REGISTER, 0, 2 * in send_dummy_register()
159 iso7816_add(apdu, &challenge, sizeof(challenge)) < 0 || in send_dummy_register()
160 iso7816_add(apdu, &application, sizeof(application)) < 0) { in send_dummy_register()
173 if (fido_tx(dev, CTAP_CMD_MSG, iso7816_ptr(apdu), in send_dummy_register()
174 iso7816_len(apdu), ms) < 0) { in send_dummy_register()
193 iso7816_free(&apdu); in send_dummy_register()
203 iso7816_apdu_t *apdu = NULL; in key_lookup() local
229 if ((apdu = iso7816_new(0, U2F_CMD_AUTH, U2F_AUTH_CHECK, (uint16_t)(2 * in key_lookup()
231 iso7816_add(apdu, &challenge, sizeof(challenge)) < 0 || in key_lookup()
[all …]
/freebsd/contrib/libfido2/fuzz/
H A Dfuzz_pcsc.c187 test_tx(const char *path, const struct blob *apdu, uint8_t cmd, u_char *rx_buf, in test_tx() argument
202 if (apdu) { in test_tx()
203 tx_ptr = apdu->body; in test_tx()
204 tx_len = apdu->len; in test_tx()