- sm will yield error when the class byte indicates a sm apdu and pace will

simply transmit the apdu without encrypting/authenticating it.
- fixed building process when compiling without pace


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@81 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-04-27 20:00:42 +00:00
parent 6e81cb30cd
commit fdc400b911
5 changed files with 29 additions and 5 deletions

View File

@@ -1296,6 +1296,11 @@ int pace_transmit_apdu(struct sm_ctx *ctx, sc_card_t *card,
{
int r;
if ((apdu->cla & 0x0C) == 0x0C) {
sc_debug(card->ctx, "Given APDU is already protected with some secure messaging.");
SC_FUNC_RETURN(card->ctx, SC_LOG_TYPE_DEBUG, sc_transmit_apdu(card, apdu));
}
if (!ctx || !ctx->cipher_ctx) {
SC_FUNC_RETURN(card->ctx, SC_LOG_TYPE_DEBUG, SC_ERROR_INVALID_ARGUMENTS);
}