Merge pull request 'vxtss library update and vxtss_symlist implementation' (#26) from vxtss_symlist into master

Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/26
Reviewed-by: Siddhant Singh <siddhant.singh@neominds.in>
This commit is contained in:
2026-07-30 19:35:30 +05:30
committed by neelimap
parent 87219deb19
commit d79b382c72
13 changed files with 556 additions and 80 deletions
@@ -21,6 +21,7 @@
#include <openssl/err.h>
#include "crypto/cryptlib.h"
#include <string.h>
#include <vxtss_symlist.h>
#define ASYNC_JOB_RUNNING 0
#define ASYNC_JOB_PAUSING 1
@@ -330,11 +331,17 @@ int async_init(void)
if (!CRYPTO_THREAD_init_local(&ctxkey, NULL))
return 0;
tss_symlist_add_new(taskIdSelf(), "ossl_init_async", "ctxkey",
&ctxkey, TSS_SYMLIST_STATE_ADDED);
if (!CRYPTO_THREAD_init_local(&poolkey, NULL)) {
CRYPTO_THREAD_cleanup_local(&ctxkey);
return 0;
}
tss_symlist_add_new(taskIdSelf(), "ossl_init_async", "poolkey",
&poolkey, TSS_SYMLIST_STATE_ADDED);
return async_local_init();
}
@@ -18,6 +18,8 @@
#include "internal/provider.h"
#include "crypto/decoder.h"
#include "crypto/context.h"
#include <openssl/crypto.h>
#include <vxtss_symlist.h>
struct ossl_lib_ctx_st {
CRYPTO_RWLOCK *lock;
@@ -95,6 +97,9 @@ static int context_init(OSSL_LIB_CTX *ctx)
if (!CRYPTO_THREAD_init_local(&ctx->rcu_local_key, NULL))
return 0;
tss_symlist_add_new(taskIdSelf(), "default_context_do_init", "ctx->rcu_local_key",
&ctx->rcu_local_key, TSS_SYMLIST_STATE_ADDED);
ctx->lock = CRYPTO_THREAD_lock_new();
if (ctx->lock == NULL)
goto err;
@@ -396,6 +401,8 @@ DEFINE_RUN_ONCE_STATIC(default_context_do_init)
if (!CRYPTO_THREAD_init_local(&default_context_thread_local, NULL))
goto err;
tss_symlist_add_new(taskIdSelf(), "default_context_do_init", "default_context_thread_local",
&default_context_thread_local, TSS_SYMLIST_STATE_ADDED);
if (!context_init(&default_context_int))
goto deinit_thread;
@@ -25,6 +25,7 @@
#include "internal/constant_time.h"
#include "internal/e_os.h"
#include "err_local.h"
#include <vxtss_symlist.h>
/* Forward declaration in case it's not published because of configuration */
ERR_STATE *ERR_get_state(void);
@@ -666,7 +667,10 @@ void ERR_remove_state(unsigned long pid)
DEFINE_RUN_ONCE_STATIC(err_do_init)
{
set_err_thread_local = 1;
return CRYPTO_THREAD_init_local(&err_thread_local, NULL);
int rc = CRYPTO_THREAD_init_local(&err_thread_local, NULL);
tss_symlist_add_new(taskIdSelf(), "err_do_init", "err_thread_local",
&err_thread_local, TSS_SYMLIST_STATE_ADDED);
return rc;
}
ERR_STATE *ossl_err_get_state_int(void)
@@ -40,6 +40,8 @@
#include <semLib.h>
#include <openssl/provider.h>
#include "ipcrypto_config.h"
#include <openssl/crypto.h>
#include <vxtss_symlist.h>
#endif
static int stopped = 0;
@@ -81,6 +83,9 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base)
if (!CRYPTO_THREAD_init_local(&in_init_config_local, NULL))
goto err;
tss_symlist_add_new(taskIdSelf(), "ossl_init_base", "in_init_config_local",
&in_init_config_local, TSS_SYMLIST_STATE_ADDED);
base_inited = 1;
return 1;
@@ -13,6 +13,7 @@
#include "prov/providercommon.h"
#include "internal/thread_once.h"
#include "crypto/context.h"
#include <vxtss_symlist.h>
#ifdef FIPS_MODULE
#include "prov/provider_ctx.h"
@@ -207,6 +208,9 @@ int ossl_init_thread(void)
init_thread_destructor))
return 0;
tss_symlist_add_new(taskIdSelf(), "ossl_init_base", "destructor_key.value",
&destructor_key.value, TSS_SYMLIST_STATE_ADDED);
return 1;
}
@@ -270,6 +274,8 @@ void *ossl_thread_event_ctx_new(OSSL_LIB_CTX *libctx)
if (!CRYPTO_THREAD_init_local(tlocal, NULL))
goto deinit;
tss_symlist_add_new(taskIdSelf(),"default_context_do_init", "tlocal",
tlocal, TSS_SYMLIST_STATE_ADDED);
hands = OPENSSL_zalloc(sizeof(*hands));
if (hands == NULL)
@@ -22,6 +22,8 @@
#include "rand_local.h"
#include "crypto/context.h"
#include "internal/provider.h"
#include <openssl/crypto.h>
#include <vxtss_symlist.h>
#ifndef OPENSSL_DEFAULT_SEED_SRC
# define OPENSSL_DEFAULT_SEED_SRC SEED-SRC
@@ -112,6 +114,8 @@ static RAND_GLOBAL *rand_get_global(OSSL_LIB_CTX *libctx)
# include "prov/seeding.h"
# include "internal/e_os.h"
# include "internal/property.h"
#include <openssl/crypto.h>
#include <vxtss_symlist.h>
/*
* The default name for the random provider.
@@ -546,9 +550,15 @@ void *ossl_rand_ctx_new(OSSL_LIB_CTX *libctx)
if (!CRYPTO_THREAD_init_local(&dgbl->private, NULL))
goto err1;
tss_symlist_add_new(taskIdSelf(), "default_context_do_init", "dgbl->private",
&dgbl->private, TSS_SYMLIST_STATE_ADDED);
if (!CRYPTO_THREAD_init_local(&dgbl->public, NULL))
goto err2;
tss_symlist_add_new(taskIdSelf(), "default_context_do_init", "dgbl->public",
&dgbl->public, TSS_SYMLIST_STATE_ADDED);
return dgbl;
err2: