- enable extended length apdu for all cards that have an ef.cardaccess
- set the bit for esign by default (for testing only) git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@337 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -425,6 +425,10 @@ perform_PC_to_RDR_IccPowerOn(const __u8 *in, size_t inlen, __u8 **out, size_t *o
|
|||||||
if (get_ef_card_access(card_in_slot[request->bSlot],
|
if (get_ef_card_access(card_in_slot[request->bSlot],
|
||||||
(u8 **) &ef_cardaccess, &ef_cardaccess_length) < 0) {
|
(u8 **) &ef_cardaccess, &ef_cardaccess_length) < 0) {
|
||||||
sc_error(ctx, "Could not get EF.CardAccess.");
|
sc_error(ctx, "Could not get EF.CardAccess.");
|
||||||
|
} else {
|
||||||
|
/* All cards with PACE support extended length
|
||||||
|
* XXX this should better be done by the card driver */
|
||||||
|
card_in_slot[request->bSlot]->caps |= SC_CARD_CAP_APDU_EXT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1139,6 +1143,9 @@ perform_PC_to_RDR_Secure(const __u8 *in, size_t inlen, __u8** out, size_t *outle
|
|||||||
|
|
||||||
sc_result = perform_PC_to_RDR_Secure_GetReadersPACECapabilities(
|
sc_result = perform_PC_to_RDR_Secure_GetReadersPACECapabilities(
|
||||||
&abDataOut, &abDataOutLen);
|
&abDataOut, &abDataOutLen);
|
||||||
|
|
||||||
|
bin_log(card_in_slot[request->bSlot], "PACE Capabilities", abDataOut, abDataOutLen);
|
||||||
|
|
||||||
goto err;
|
goto err;
|
||||||
break;
|
break;
|
||||||
case 0x20:
|
case 0x20:
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ int GetReadersPACECapabilities(u8 *bitmap)
|
|||||||
return SC_ERROR_INVALID_ARGUMENTS;
|
return SC_ERROR_INVALID_ARGUMENTS;
|
||||||
|
|
||||||
/* BitMap */
|
/* BitMap */
|
||||||
*bitmap = PACE_BITMAP_PACE|PACE_BITMAP_EID;
|
*bitmap = PACE_BITMAP_EID|PACE_BITMAP_EID|PACE_BITMAP_ESIGN;
|
||||||
|
|
||||||
return SC_SUCCESS;
|
return SC_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -1257,10 +1257,6 @@ int EstablishPACEChannel(struct sm_ctx *oldpacectx, sc_card_t *card,
|
|||||||
sctx->block_length = EVP_CIPHER_block_size(pctx->cipher);
|
sctx->block_length = EVP_CIPHER_block_size(pctx->cipher);
|
||||||
sctx->active = 1;
|
sctx->active = 1;
|
||||||
|
|
||||||
/* All cards with PACE support extended length
|
|
||||||
* XXX this should better be done by the card driver */
|
|
||||||
card->caps |= SC_CARD_CAP_APDU_EXT;
|
|
||||||
|
|
||||||
err:
|
err:
|
||||||
if (info)
|
if (info)
|
||||||
PACEInfo_free(info);
|
PACEInfo_free(info);
|
||||||
|
|||||||
Reference in New Issue
Block a user