- pace.c: removed unused variable ssc

- pace.c: bugfix: don't increment ssc when resetting it.
- sm.c/.h: wrote wrapper sm_transmit_apdu
- sm.c: removed sm error handling, should be done by sc_check_sw
- sm.c/ccid.c/pace.c: added qualifier "static" to local functions


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@58 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-04-10 18:16:09 +00:00
parent 8905bdec72
commit 495149f265
4 changed files with 62 additions and 83 deletions

View File

@@ -33,7 +33,6 @@ struct sm_ctx {
u8 padding_indicator;
size_t block_length;
void *authentication_ctx;
int (*authenticate)(sc_card_t *card, const struct sm_ctx *ctx,
const u8 *data, size_t datalen, u8 **outdata);
@@ -48,12 +47,8 @@ struct sm_ctx {
const u8 *enc, size_t enclen, u8 **data);
};
int sm_encrypt(const struct sm_ctx *ctx, sc_card_t *card,
const sc_apdu_t *apdu, sc_apdu_t *sm_apdu);
int sm_decrypt(const struct sm_ctx *ctx, sc_card_t *card,
const sc_apdu_t *sm_apdu, sc_apdu_t *apdu);
int sm_check_sw(sc_card_t *card, unsigned int sw1, unsigned int sw2);
int sm_transmit_apdu(const struct sm_ctx *sctx, sc_card_t *card,
sc_apdu_t *apdu);
BUF_MEM * add_iso_pad(const BUF_MEM * m, int block_size);
BUF_MEM * add_padding(const struct sm_ctx *ctx, const char *data, size_t datalen);