- 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

@@ -273,6 +273,12 @@ static int sm_encrypt(const struct sm_ctx *ctx, sc_card_t *card,
goto err;
}
if ((apdu->cla & 0x0C) == 0x0C) {
r = SC_ERROR_INVALID_ARGUMENTS;
sc_error(card->ctx, "Given APDU is already protected with some secure messaging.");
goto err;
}
sc_copy_asn1_entry(c_sm_capdu, sm_capdu);
sm_apdu->sensitive = 0;