working on support for certificate description
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@280 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -964,6 +964,7 @@ int EstablishPACEChannel(const struct sm_ctx *oldpacectx, sc_card_t *card,
|
||||
*comp_pub = NULL, *comp_pub_opp = NULL;
|
||||
PACE_SEC *sec = NULL;
|
||||
PACE_CTX *pctx = NULL;
|
||||
CVC_CERTIFICATE_DESCRIPTION *cert_desc = NULL;
|
||||
int r;
|
||||
|
||||
if (!card)
|
||||
@@ -971,6 +972,18 @@ int EstablishPACEChannel(const struct sm_ctx *oldpacectx, sc_card_t *card,
|
||||
if (!pace_output || !sctx)
|
||||
return SC_ERROR_INVALID_ARGUMENTS;
|
||||
|
||||
/* show description in advance to give the user more time to read it...
|
||||
* This behaviour differs from TR-03119 v1.1 p. 44. */
|
||||
if (pace_input.certificate_description_length &&
|
||||
pace_input.certificate_description) {
|
||||
|
||||
cert_desc = d2i_CVC_CERTIFICATE_DESCRIPTION(NULL, &cert_desc_in, len);
|
||||
|
||||
/* XXX get hash of certificate description */
|
||||
}
|
||||
|
||||
/* XXX parse CHAT to check role of terminal */
|
||||
|
||||
if (!pace_output->ef_cardaccess_length || !pace_output->ef_cardaccess) {
|
||||
r = get_ef_card_access(card, &pace_output->ef_cardaccess,
|
||||
&pace_output->ef_cardaccess_length);
|
||||
@@ -1139,8 +1152,6 @@ int EstablishPACEChannel(const struct sm_ctx *oldpacectx, sc_card_t *card,
|
||||
bin_log(card->ctx, "ID PCD", pace_output->id_pcd,
|
||||
pace_output->id_pcd_length);
|
||||
|
||||
/* XXX parse CHAT to check role of terminal */
|
||||
|
||||
sctx->authentication_ctx = pace_sm_ctx_create(k_mac,
|
||||
k_enc, pctx);
|
||||
if (!sctx->authentication_ctx) {
|
||||
|
||||
Reference in New Issue
Block a user