- using short apdus for mse:set at and generic authenticate. to make it work with the sm implementation

- added parameter oldpacectx to EstablishPACEChannel to allow a a new PACE connection inside an exitsting PACE connection (the output buffer of the latter connection must be provided since it stores the ef.cardaccess)
- added functionality to ask for the secret in pace_reset_retry_counter
- added macro pace_change_pin
- SWs were stored at the wrong place of the output buffer from EstablishPACEChannel, fixed.
- split up functionality of pace_test into multiple functions
- added new command line option to pace-tool to resume the pin. resuming the pin is not working, yet.


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@108 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-05-20 08:17:38 +00:00
parent d0a6668f58
commit 894d5be379
4 changed files with 232 additions and 153 deletions

View File

@@ -61,13 +61,16 @@ int pace_sm_verify_authentication(sc_card_t *card, const struct sm_ctx *ctx,
int GetReadersPACECapabilities(sc_card_t *card, const __u8
*in, __u8 **out, size_t *outlen);
int EstablishPACEChannel(sc_card_t *card, const struct pace_sm_ctx *oldctx,
const __u8 *in, __u8 **out, size_t *outlen, struct sm_ctx *sctx)
int EstablishPACEChannel(const struct sm_ctx *oldpacectx, sc_card_t *card,
const __u8 *in, __u8 **out, size_t *outlen, struct sm_ctx *sctx);
int pace_transmit_apdu(struct sm_ctx *sctx, sc_card_t *card,
int pace_transmit_apdu(const struct sm_ctx *sctx, sc_card_t *card,
sc_apdu_t *apdu);
int pace_reset_retry_counter(struct sm_ctx *ctx, sc_card_t *card,
enum s_type pin_id, const char *new, size_t new_len);
enum s_type pin_id, int ask_for_secret,
const char *new, size_t new_len);
#define pace_change_pin(ctx, card, newp, newplen) \
pace_reset_retry_counter(ctx, card, PACE_PIN, 1, newp, newplen)
#ifdef __cplusplus
}