don't debug pointers

This commit is contained in:
Frank Morgner 2018-11-30 18:09:39 +01:00
parent 5474370b17
commit f2145eca79
5 changed files with 2 additions and 31 deletions

View File

@ -1460,7 +1460,6 @@ sc_card_sm_check(struct sc_card *card)
int rv, ii;
LOG_FUNC_CALLED(ctx);
sc_log(ctx, "card->sm_ctx.ops.open %p", card->sm_ctx.ops.open);
/* get the name of card specific SM configuration section */
atrblock = _sc_match_atr_block(ctx, card->driver, &card->atr);
@ -1501,10 +1500,8 @@ sc_card_sm_check(struct sc_card *card)
strlcpy(card->sm_ctx.config_section, sm, sizeof(card->sm_ctx.config_section));
/* allocate resources for the external SM module */
sc_log(ctx, "'module_init' handler %p", card->sm_ctx.module.ops.module_init);
if (card->sm_ctx.module.ops.module_init) {
module_data = scconf_get_str(sm_conf_block, "module_data", NULL);
sc_log(ctx, "module_data '%s'", module_data);
rv = card->sm_ctx.module.ops.module_init(ctx, module_data);
LOG_TEST_RET(ctx, rv, "Cannot initialize SM module");
@ -1512,7 +1509,6 @@ sc_card_sm_check(struct sc_card *card)
/* initialize SM session in the case of 'APDU TRANSMIT' SM mode */
sm_mode = scconf_get_str(sm_conf_block, "mode", NULL);
sc_log(ctx, "SM mode '%s'; 'open' handler %p", sm_mode, card->sm_ctx.ops.open);
if (sm_mode && !strcasecmp("Transmit", sm_mode)) {
if (!card->sm_ctx.ops.open || !card->sm_ctx.ops.get_sm_apdu || !card->sm_ctx.ops.free_sm_apdu)
LOG_TEST_RET(ctx, SC_ERROR_NOT_SUPPORTED, "'Transmit' SM asked but not supported by card driver");

View File

@ -267,10 +267,6 @@ asn1_decode_ec_params(sc_context_t *ctx, void **paramp,
struct sc_asn1_entry asn1_ec_params[4];
struct sc_ec_parameters *ecp;
sc_debug(ctx, SC_LOG_DEBUG_ASN1,
"DEE - asn1_decode_ec_params %p:%"SC_FORMAT_LEN_SIZE_T"u %d",
buf, buflen, depth);
memset(&curve, 0, sizeof(curve));
/* We only want to copy the parms if they are a namedCurve

View File

@ -726,9 +726,6 @@ sc_pkcs15_decode_pubkey_ec(sc_context_t *ctx,
if (*ecpoint_data != 0x04)
LOG_TEST_RET(ctx, SC_ERROR_NOT_SUPPORTED, "Supported only uncompressed EC pointQ value");
sc_log(ctx, "decode-EC key=%p, buf=%p, buflen=%"SC_FORMAT_LEN_SIZE_T"u",
key, buf, buflen);
key->ecpointQ.len = ecpoint_len;
key->ecpointQ.value = ecpoint_data;
@ -747,19 +744,13 @@ sc_pkcs15_encode_pubkey_ec(sc_context_t *ctx, struct sc_pkcs15_pubkey_ec *key,
u8 **buf, size_t *buflen)
{
struct sc_asn1_entry asn1_ec_pointQ[C_ASN1_EC_POINTQ_SIZE];
int r;
LOG_FUNC_CALLED(ctx);
sc_copy_asn1_entry(c_asn1_ec_pointQ, asn1_ec_pointQ);
sc_format_asn1_entry(asn1_ec_pointQ + 0, key->ecpointQ.value, &key->ecpointQ.len, 1);
r = sc_asn1_encode(ctx, asn1_ec_pointQ, buf, buflen);
LOG_TEST_RET(ctx, r, "ASN.1 encoding failed");
sc_log(ctx,
"EC key->ecpointQ=%p:%"SC_FORMAT_LEN_SIZE_T"u *buf=%p:%"SC_FORMAT_LEN_SIZE_T"u",
key->ecpointQ.value, key->ecpointQ.len, *buf, *buflen);
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
LOG_FUNC_RETURN(ctx,
sc_asn1_encode(ctx, asn1_ec_pointQ, buf, buflen));
}

View File

@ -712,7 +712,6 @@ __pkcs15_create_pubkey_object(struct pkcs15_fw_data *fw_data,
struct sc_pkcs15_pubkey *p15_key = NULL;
int rv;
sc_log(context, "__pkcs15_create_pubkey_object() called, pubkey %p, data %p", pubkey, pubkey->data);
/* Read public key from card */
/* Attempt to read pubkey from card or file.
* During initialization process, the key may have been created
@ -754,7 +753,6 @@ __pkcs15_create_pubkey_object(struct pkcs15_fw_data *fw_data,
if (pubkey_object != NULL)
*pubkey_object = (struct pkcs15_any_object *) object;
sc_log(context, "__pkcs15_create_pubkey_object() returns pubkey object %p", object);
return rv;
}
@ -1136,7 +1134,6 @@ pkcs15_create_slot(struct sc_pkcs11_card *p11card, struct pkcs15_fw_data *fw_dat
struct sc_pkcs11_slot *slot = NULL;
CK_RV rv;
sc_log(context, "Create slot (p11card %p, fw_data %p, auth %p, app_info %p)", p11card, fw_data, auth, app_info);
rv = slot_allocate(&slot, p11card);
if (rv != CKR_OK)
return rv;
@ -1514,7 +1511,6 @@ pkcs15_create_tokens(struct sc_pkcs11_card *p11card, struct sc_app_info *app_inf
_add_pin_related_objects(sign_slot, auth_sign_pin, fw_data, NULL);
}
sc_log(context, "slot %p, sign-slot %p\n", slot, sign_slot);
if (!slot && sign_slot)
slot = sign_slot;
}
@ -4147,9 +4143,6 @@ pkcs15_prkey_derive(struct sc_pkcs11_session *session, void *obj,
if (!fw_data)
return sc_to_cryptoki_error(SC_ERROR_INTERNAL, "C_DeriveKey");
sc_log(context, "derivation %p %p %p %p %lu %p %lu", session, obj,
pMechanism, pParameters, ulParametersLen, pData, *pulDataLen);
/* See which of the alternative keys supports derivation */
while (prkey && !(prkey->prv_info->usage & SC_PKCS15_PRKEY_USAGE_DERIVE))
prkey = prkey->prv_next;
@ -4638,10 +4631,6 @@ data_value_to_attr(CK_ATTRIBUTE_PTR attr, struct sc_pkcs15_data *data)
if (!attr || !data)
return CKR_ATTRIBUTE_VALUE_INVALID;
sc_log(context,
"data_value_to_attr(): data(%p,len:%"SC_FORMAT_LEN_SIZE_T"u)",
data, data->data_len);
check_attribute_buffer(attr, data->data_len);
memcpy(attr->pValue, data->data, data->data_len);
return CKR_OK;

View File

@ -58,7 +58,6 @@ sc_find_release(sc_pkcs11_operation_t *operation)
{
struct sc_pkcs11_find_operation *fop = (struct sc_pkcs11_find_operation *)operation;
sc_log(context,"freeing %d handles used %d at %p", fop->allocated_handles, fop->num_handles, fop->handles);
if (fop->handles) {
free(fop->handles);
fop->handles = NULL;