Added struct sc_card to process_fci(), just like it's done with the orhter card operations
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1311 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
10a9d6ffc4
commit
0b1a65cd81
|
@ -491,7 +491,8 @@ static int iso7816_get_challenge(struct sc_card *card, u8 *rnd, size_t len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int iso7816_construct_fci(const struct sc_file *file, u8 *out, size_t *outlen)
|
static int iso7816_construct_fci(struct sc_card *card, const struct sc_file *file,
|
||||||
|
u8 *out, size_t *outlen)
|
||||||
{
|
{
|
||||||
u8 *p = out;
|
u8 *p = out;
|
||||||
u8 buf[64];
|
u8 buf[64];
|
||||||
|
@ -552,7 +553,7 @@ static int iso7816_create_file(struct sc_card *card, struct sc_file *file)
|
||||||
|
|
||||||
if (card->ops->construct_fci == NULL)
|
if (card->ops->construct_fci == NULL)
|
||||||
SC_FUNC_RETURN(card->ctx, 2, SC_ERROR_NOT_SUPPORTED);
|
SC_FUNC_RETURN(card->ctx, 2, SC_ERROR_NOT_SUPPORTED);
|
||||||
r = card->ops->construct_fci(file, sbuf, &len);
|
r = card->ops->construct_fci(card, file, sbuf, &len);
|
||||||
SC_TEST_RET(card->ctx, r, "construct_fci() failed");
|
SC_TEST_RET(card->ctx, r, "construct_fci() failed");
|
||||||
|
|
||||||
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xE0, 0x00, 0x00);
|
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xE0, 0x00, 0x00);
|
||||||
|
|
|
@ -555,7 +555,8 @@ struct sc_card_operations {
|
||||||
void *data);
|
void *data);
|
||||||
int (*process_fci)(struct sc_card *card, struct sc_file *file,
|
int (*process_fci)(struct sc_card *card, struct sc_file *file,
|
||||||
const u8 *buf, size_t buflen);
|
const u8 *buf, size_t buflen);
|
||||||
int (*construct_fci)(const struct sc_file *file, u8 *out, size_t *outlen);
|
int (*construct_fci)(struct sc_card *card, const struct sc_file *file,
|
||||||
|
u8 *out, size_t *outlen);
|
||||||
|
|
||||||
/* pin_cmd: verify/change/unblock command; optionally using the
|
/* pin_cmd: verify/change/unblock command; optionally using the
|
||||||
* card's pin pad if supported.
|
* card's pin pad if supported.
|
||||||
|
|
Loading…
Reference in New Issue