- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user