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:
sth 2003-07-28 13:19:49 +00:00
parent 10a9d6ffc4
commit 0b1a65cd81
2 changed files with 5 additions and 3 deletions

View File

@ -491,7 +491,8 @@ static int iso7816_get_challenge(struct sc_card *card, u8 *rnd, size_t len)
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 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)
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_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xE0, 0x00, 0x00);

View File

@ -555,7 +555,8 @@ struct sc_card_operations {
void *data);
int (*process_fci)(struct sc_card *card, struct sc_file *file,
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
* card's pin pad if supported.