apdu.sensitive is not in use since [2868]

git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3751 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2009-10-03 09:31:07 +00:00
parent 9da39d8462
commit 64f9578202
18 changed files with 0 additions and 43 deletions

View File

@ -354,7 +354,6 @@ akis_pin_cmd(struct sc_card *card, struct sc_pin_cmd_data *data, int *tries_left
p1 = 1;
}
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x24, p1, p2);
apdu.sensitive = 1;
buf[0] = data->pin1.len;
memcpy(buf+1, data->pin1.data, data->pin1.len);

View File

@ -509,7 +509,6 @@ static int asepcos_decipher(sc_card_t *card, const u8 * crgram, size_t crgram_le
* to tell the card the we want everything available (note: we
* always have Le <= crgram_len) */
apdu.le = (outlen >= 256 && crgram_len < 256) ? 256 : outlen;
apdu.sensitive = 1;
apdu.data = crgram;
apdu.lc = crgram_len;
@ -990,9 +989,6 @@ static int asepcos_build_pin_apdu(sc_card_t *card, sc_apdu_t *apdu,
default:
return SC_ERROR_NOT_SUPPORTED;
}
/* all PIN related APDUs are sensitive */
apdu->sensitive = 1;
return SC_SUCCESS;
}

View File

@ -706,7 +706,6 @@ static int atrust_acos_compute_signature(struct sc_card *card,
apdu.lc = 0;
apdu.datalen = 0;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
if (apdu.sw1 == 0x90 && apdu.sw2 == 0x00) {
@ -781,7 +780,6 @@ static int atrust_acos_decipher(struct sc_card *card,
sc_format_apdu(card, &apdu, SC_APDU_CASE_4_SHORT, 0x2A, 0x80, 0x86);
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf);
apdu.sensitive = 1;
sbuf[0] = 0; /* padding indicator byte, 0x00 = No further indication */
memcpy(sbuf + 1, crgram, crgram_len);

View File

@ -774,7 +774,6 @@ do_compute_signature(sc_card_t *card, const u8 *data, size_t datalen,
apdu.data = data;
apdu.lc = datalen;
apdu.datalen = datalen;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");

View File

@ -907,7 +907,6 @@ static int entersafe_compute_with_prkey(sc_card_t *card,
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf);
apdu.le = 256;
apdu.sensitive = 1;
r = entersafe_transmit_apdu(card, &apdu,0,0,0,0);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");

View File

@ -1066,7 +1066,6 @@ cryptoflex_compute_signature(sc_card_t *card, const u8 *data,
apdu.resplen = outlen > sizeof(sbuf) ? sizeof(sbuf) : outlen;
apdu.le = apdu.resplen > 256 ? 256 : apdu.resplen;
apdu.resp = sbuf;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
r = sc_check_sw(card, apdu.sw1, apdu.sw2);
@ -1106,7 +1105,6 @@ cyberflex_compute_signature(sc_card_t *card, const u8 *data,
apdu.data = data;
apdu.resplen = outlen;
apdu.resp = out;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
r = sc_check_sw(card, apdu.sw1, apdu.sw2);
@ -1279,7 +1277,6 @@ static int flex_build_verify_apdu(sc_card_t *card, sc_apdu_t *apdu,
apdu->data = sbuf;
apdu->datalen = len;
apdu->lc = len;
apdu->sensitive = 1;
return 0;
}

View File

@ -429,7 +429,6 @@ static int gemsafe_compute_signature(struct sc_card *card, const u8 * data,
apdu.data = sbuf;
apdu.lc = data_len + 2;
apdu.datalen = data_len + 2;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
@ -459,7 +458,6 @@ static int gemsafe_decipher(struct sc_card *card, const u8 * crgram,
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf);
apdu.le = crgram_len;
apdu.sensitive = 1;
apdu.data = crgram;
apdu.lc = crgram_len;
@ -549,7 +547,6 @@ static int gemsafe_build_pin_apdu(struct sc_card *card,
apdu->datalen = len;
apdu->data = sbuf;
apdu->resplen = 0;
apdu->sensitive = 1;
return 0;
}

View File

@ -994,7 +994,6 @@ gpk_select_key(sc_card_t *card, int key_sfi, const u8 *buf, size_t buflen)
apdu.resp = resp;
apdu.resplen = sizeof(resp);
apdu.le = 12;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
@ -1347,7 +1346,6 @@ gpk_decipher(sc_card_t *card, const u8 *in, size_t inlen,
apdu.le = 256; /* give me all you got :) */
apdu.resp = buffer;
apdu.resplen = sizeof(buffer);
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
@ -1582,7 +1580,6 @@ gpk_pkfile_load(sc_card_t *card, struct sc_cardctl_gpk_pkload *args)
apdu.p1 = args->file->id & 0x1F;
apdu.p2 = args->len;
apdu.lc = args->datalen;
apdu.sensitive = 1;
/* encrypt the private key material */
assert(args->datalen <= sizeof(temp));
@ -1836,7 +1833,6 @@ gpk_build_pin_apdu(sc_card_t *card, sc_apdu_t *apdu, struct sc_pin_cmd_data *dat
apdu->lc = 8;
apdu->datalen = 8;
apdu->data = sbuf;
apdu->sensitive = 1;
return 0;
}

View File

@ -516,7 +516,6 @@ static int do_compute_signature(sc_card_t *card,
apdu.data = sbuf;
apdu.lc = datalen;
apdu.datalen = datalen;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");

View File

@ -751,7 +751,6 @@ static int jcop_compute_signature(sc_card_t *card,
}
apdu.data = sbuf;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
if (apdu.sw1 == 0x90 && apdu.sw2 == 0x00) {
@ -789,7 +788,6 @@ static int jcop_decipher(sc_card_t *card,
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf); /* FIXME */
apdu.le = crgram_len;
apdu.sensitive = 1;
if (crgram_len == 256) {
apdu.p2 = crgram[0];

View File

@ -1311,8 +1311,6 @@ static int mcrd_decipher(sc_card_t * card,
apdu.datalen = crgram_len;
apdu.lc = apdu.datalen;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
r = sc_check_sw(card, apdu.sw1, apdu.sw2);

View File

@ -568,7 +568,6 @@ static int myeid_compute_signature(struct sc_card *card, const u8 * data,
}
apdu.data = sbuf;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
@ -606,7 +605,6 @@ static int myeid_decipher(struct sc_card *card, const u8 * crgram,
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf);
apdu.le = crgram_len;
apdu.sensitive = 1;
if (crgram_len == 256)
{ apdu.le = 0;
@ -635,7 +633,6 @@ static int myeid_decipher(struct sc_card *card, const u8 * crgram,
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf);
apdu.le = crgram_len;
apdu.sensitive = 1;
/* padding indicator byte,
* 0x82 = Second half of 2048 bit cryptogram */
sbuf[0] = 0x82;

View File

@ -1462,7 +1462,6 @@ auth_update_component(sc_card_t *card, struct auth_update_component_info *args)
apdu.data = sbuf;
apdu.datalen = len;
apdu.lc = len;
apdu.sensitive = 1;
if (args->len == 0x100) {
sbuf[0] = args->type;
sbuf[1] = 0x20;
@ -1724,7 +1723,6 @@ auth_verify(sc_card_t *card, unsigned int type,
apdu.data = sbuf;
apdu.datalen = pinfo.pad_length;
apdu.lc = pinfo.pad_length;
apdu.sensitive = 1;
}
else {
sc_format_apdu(card, &apdu, SC_APDU_CASE_1, 0x20, 0, pin_ref);
@ -1776,7 +1774,6 @@ auth_change_reference_data (sc_card_t *card, unsigned int type,
apdu.data = sbuf;
apdu.datalen = pinfo.pad_length * 2;
apdu.lc = pinfo.pad_length * 2;
apdu.sensitive = 1;
rv = sc_transmit_apdu(card, &apdu);
sc_mem_clear(sbuf, sizeof(sbuf));
@ -1842,7 +1839,6 @@ auth_reset_retry_counter(sc_card_t *card, unsigned int type,
apdu.data = sbuf;
apdu.datalen = len;
apdu.lc = len;
apdu.sensitive = 1;
rv = sc_transmit_apdu(card, &apdu);
sc_mem_clear(sbuf, sizeof(sbuf));
@ -1905,7 +1901,6 @@ auth_create_reference_data (sc_card_t *card,
apdu.data = sbuf;
apdu.datalen = len;
apdu.lc = len;
apdu.sensitive = 1;
rv = sc_transmit_apdu(card, &apdu);
sc_mem_clear(sbuf, sizeof(sbuf));

View File

@ -337,7 +337,6 @@ static int rtecp_verify(sc_card_t *card, unsigned int type, int ref_qualifier,
apdu.lc = data_len;
apdu.data = data;
apdu.datalen = data_len;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
if (send_logout++ == 0 && apdu.sw1 == 0x6F && apdu.sw2 == 0x86)
@ -403,7 +402,6 @@ static int rtecp_rsa_cipher(sc_card_t *card, const u8 *data, size_t data_len,
apdu.lc = data_len;
apdu.data = buf;
apdu.datalen = data_len;
apdu.sensitive = 1;
apdu.resp = buf_out;
apdu.resplen = data_len + 2;
apdu.le = data_len;
@ -513,7 +511,6 @@ static int rtecp_change_reference_data(sc_card_t *card, unsigned int type,
apdu.lc = p - buf;
apdu.data = buf;
apdu.datalen = p - buf;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
sc_mem_clear(buf, sizeof(buf));

View File

@ -1181,7 +1181,6 @@ static int starcos_compute_signature(sc_card_t *card,
apdu.lc = 0;
apdu.datalen = 0;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
if (apdu.sw1 == 0x90 && apdu.sw2 == 0x00) {

View File

@ -885,7 +885,6 @@ static int westcos_pin_cmd(sc_card_t * card, struct sc_pin_cmd_data *data,
apdu.datalen = len;
apdu.data = buf;
apdu.resplen = 0;
apdu.sensitive = 1;
if (!use_pin_pad) {
/* Transmit the APDU to the card */

View File

@ -782,7 +782,6 @@ static int iso7816_compute_signature(sc_card_t *card,
apdu.data = sbuf;
apdu.lc = datalen;
apdu.datalen = datalen;
apdu.sensitive = 1;
r = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
if (apdu.sw1 == 0x90 && apdu.sw2 == 0x00) {
@ -819,7 +818,6 @@ static int iso7816_decipher(sc_card_t *card,
* to tell the card the we want everything available (note: we
* always have Le <= crgram_len) */
apdu.le = (outlen >= 256 && crgram_len < 256) ? 256 : outlen;
apdu.sensitive = 1;
sbuf[0] = 0; /* padding indicator byte, 0x00 = No further indication */
memcpy(sbuf + 1, crgram, crgram_len);
@ -908,7 +906,6 @@ static int iso7816_build_pin_apdu(sc_card_t *card, sc_apdu_t *apdu,
apdu->datalen = len;
apdu->data = buf;
apdu->resplen = 0;
apdu->sensitive = 1;
return 0;
}

View File

@ -113,9 +113,6 @@ typedef struct sc_apdu {
u8 *resp; /* R-APDU data buffer */
size_t resplen; /* in: size of R-APDU buffer,
* out: length of data returned in R-APDU */
u8 sensitive; /* Set if either the command or
* the response contains secrets,
* e.g. a PIN. */
u8 control; /* Set if APDU should go to the reader */
unsigned int sw1, sw2; /* Status words returned in R-APDU */