added PACE features to ccid-emulator (untested)

git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@152 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-06-16 21:06:30 +00:00
parent 0e2558b0cc
commit d40f91b505
7 changed files with 298 additions and 18 deletions

View File

@@ -869,6 +869,9 @@ int EstablishPACEChannel(const struct sm_ctx *oldpacectx, sc_card_t *card,
r = SC_ERROR_OUT_OF_MEMORY;
goto err;
}
r = reset_ssc(sctx->authentication_ctx);
if (r < 0)
goto err;
sctx->cipher_ctx = sctx->authentication_ctx;
sctx->authenticate = pace_sm_authenticate;
sctx->encrypt = pace_sm_encrypt;
@@ -878,8 +881,7 @@ int EstablishPACEChannel(const struct sm_ctx *oldpacectx, sc_card_t *card,
sctx->post_transmit = pace_sm_post_transmit;
sctx->padding_indicator = SM_ISO_PADDING;
sctx->block_length = EVP_CIPHER_block_size(pctx->cipher);
r = reset_ssc(sctx->authentication_ctx);
sctx->active = 1;
err:
if (ef_cardaccess && !second_execution)