#include "crypto/cryptlib.h"
#include <openssl/conf.h>
+#include <openssl/trace.h>
#include "internal/thread_once.h"
#include "internal/property.h"
#include "internal/cryptlib.h"
ctx->evp_method_store = ossl_method_store_new(ctx);
if (ctx->evp_method_store == NULL)
goto err;
+ OSSL_TRACE1(QUERY, "context_init: allocating store %p\n", ctx->evp_method_store);
#ifndef FIPS_MODULE
/* P2. Must be freed before the provider store is freed */
#include <stddef.h>
#include <openssl/core.h>
+#include <openssl/trace.h>
#include "internal/cryptlib.h"
#include "internal/core.h"
#include "internal/property.h"
== NULL)
return;
+ OSSL_TRACE2(QUERY,
+ "ossl_method_construct_this: putting an algo to the store %p with no_store %d\n",
+ (void *)data->store, no_store);
/*
* Note regarding putting the method in stores:
*
{
struct evp_method_data_st *methdata = data;
- if (methdata->tmp_store == NULL)
+ if (methdata->tmp_store == NULL) {
methdata->tmp_store = ossl_method_store_new(methdata->libctx);
+ OSSL_TRACE1(QUERY, "Allocating a new tmp_store %p\n", (void *)methdata->tmp_store);
+ } else {
+ OSSL_TRACE1(QUERY, "Using the existing tmp_store %p\n", (void *)methdata->tmp_store);
+ }
return methdata->tmp_store;
}
static void dealloc_tmp_evp_method_store(void *store)
{
+ OSSL_TRACE1(QUERY, "Deallocating the tmp_store %p\n", store);
if (store != NULL)
ossl_method_store_free(store);
}
|| (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
return 0;
+ OSSL_TRACE1(QUERY, "put_evp_method_in_store: original store: %p\n", store);
if (store == NULL
&& (store = get_evp_method_store(methdata->libctx)) == NULL)
return 0;
+ OSSL_TRACE5(QUERY,
+ "put_evp_method_in_store: "
+ "store: %p, names: %s, operation_id %d, method_id: %d, properties: %s\n",
+ store, names, methdata->operation_id, meth_id, propdef ? propdef : "<null>");
return ossl_method_store_add(store, prov, meth_id, propdef, method,
methdata->refcnt_up_method,
methdata->destruct_method);
ossl_lib_ctx_get_descriptor(methdata->libctx),
name == NULL ? "<null>" : name, name_id,
properties == NULL ? "<null>" : properties);
+ } else {
+ OSSL_TRACE4(QUERY, "%s, Algorithm (%s : %d), Properties (%s)\n",
+ ossl_lib_ctx_get_descriptor(methdata->libctx),
+ name == NULL ? "<null>" : name, name_id,
+ properties == NULL ? "<null>" : properties);
}
return method;
alg->nid = nid;
if (!ossl_method_store_insert(store, alg))
goto err;
+ OSSL_TRACE2(QUERY, "Inserted an alg with nid %d into the store %p\n", nid, (void *)store);
}
/* Push onto stack if there isn't one there already */
if (!ossl_property_read_lock(store))
return 0;
+ OSSL_TRACE2(QUERY, "Retrieving by nid %d from store %p\n", nid, (void *)store);
alg = ossl_method_store_retrieve(store, nid);
if (alg == NULL) {
ossl_property_unlock(store);
+ OSSL_TRACE2(QUERY, "Failed to retrieve by nid %d from store %p\n", nid, (void *)store);
return 0;
}
+ OSSL_TRACE2(QUERY, "Retrieved by nid %d from store %p\n", nid, (void *)store);
/*
* If a property query string is provided, convert it to an