adapted to changes of OpenPACE

Now works with OpenPACE 5182c69ee9dfe4ad7787d4f513d467d81a1f27ed
This commit is contained in:
Frank Morgner
2012-11-21 17:42:40 +01:00
parent f5a2cde7d6
commit c6f61aa3eb
2 changed files with 4 additions and 11 deletions

View File

@@ -1660,8 +1660,7 @@ int perform_terminal_authentication(struct sm_ctx *ctx, sc_card_t *card,
}
if (!EAC_CTX_init_ta(eacsmctx->ctx, privkey, privkey_len, cert, cert_len,
NULL, 0)) {
if (!EAC_CTX_init_ta(eacsmctx->ctx, privkey, privkey_len, cert, cert_len)) {
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "Could not initialize TA.");
ssl_error(card->ctx);
r = SC_ERROR_INTERNAL;
@@ -2336,14 +2335,8 @@ npa_sm_pre_transmit(sc_card_t *card, const struct sm_ctx *ctx,
if (msesetat->key_reference1 && msesetat->key_reference1->data &&
msesetat->key_reference1->length) {
if (!EAC_CTX_init_ta(eacsmctx->ctx, NULL, 0, NULL, 0,
msesetat->key_reference1->data,
msesetat->key_reference1->length)) {
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "Could not initialize TA.\n");
ssl_error(card->ctx);
r = SC_ERROR_INTERNAL;
goto err;
}
/* do nothing. The trust anchor matching this CAR will be
* looked up when the certificate chain is imported */
}
}
} else if (apdu->ins == 0x82 && apdu->p1 == 0x00 && apdu->p2 == 0x00) {

View File

@@ -306,7 +306,7 @@ class nPA_SE(Security_Environment):
result.append([0x87, len(self.car), self.car])
if (self.disable_checks):
pace.TA_disable_checks(self.eac_ctx)
if not pace.EAC_CTX_init_ta(self.eac_ctx, None, self.cvca, self.car):
if not pace.EAC_CTX_init_ta(self.eac_ctx, None, self.cvca):
pace.print_ossl_err()
raise SwError(SW["WARN_NOINFO63"])