Latest update.

This commit is contained in:
2020-05-17 20:27:18 +09:00
parent ad9fce94c2
commit 3a6d64bb68
619 changed files with 13638 additions and 4698 deletions
+10 -10
View File
@@ -13,7 +13,7 @@
#include "prov/providercommon.h"
#include "internal/thread_once.h"
#ifdef FIPS_MODE
#ifdef FIPS_MODULE
/*
* Thread aware code may want to be told about thread stop events. We register
* to hear about those thread stop events when we see a new thread has started.
@@ -37,7 +37,7 @@ struct thread_event_handler_st {
THREAD_EVENT_HANDLER *next;
};
#ifndef FIPS_MODE
#ifndef FIPS_MODULE
DEFINE_SPECIAL_STACK_OF(THREAD_EVENT_HANDLER_PTR, THREAD_EVENT_HANDLER *)
typedef struct global_tevent_register_st GLOBAL_TEVENT_REGISTER;
@@ -77,7 +77,7 @@ static GLOBAL_TEVENT_REGISTER *get_global_tevent_register(void)
}
#endif
#ifndef FIPS_MODE
#ifndef FIPS_MODULE
static int init_thread_push_handlers(THREAD_EVENT_HANDLER **hands);
static void init_thread_remove_handlers(THREAD_EVENT_HANDLER **handsin);
static void init_thread_destructor(void *hands);
@@ -101,7 +101,7 @@ init_get_thread_local(CRYPTO_THREAD_LOCAL *local, int alloc, int keep)
return NULL;
}
#ifndef FIPS_MODE
#ifndef FIPS_MODULE
if (!init_thread_push_handlers(hands)) {
CRYPTO_THREAD_set_local(local, NULL);
OPENSSL_free(hands);
@@ -116,7 +116,7 @@ init_get_thread_local(CRYPTO_THREAD_LOCAL *local, int alloc, int keep)
return hands;
}
#ifndef FIPS_MODE
#ifndef FIPS_MODULE
/*
* Since per-thread-specific-data destructors are not universally
* available, i.e. not on Windows, only below CRYPTO_THREAD_LOCAL key
@@ -292,7 +292,7 @@ void ossl_ctx_thread_stop(void *arg)
init_thread_stop(arg, hands);
OPENSSL_free(hands);
}
#endif /* FIPS_MODE */
#endif /* FIPS_MODULE */
static void init_thread_stop(void *arg, THREAD_EVENT_HANDLER **hands)
@@ -328,7 +328,7 @@ int ossl_init_thread_start(const void *index, void *arg,
{
THREAD_EVENT_HANDLER **hands;
THREAD_EVENT_HANDLER *hand;
#ifdef FIPS_MODE
#ifdef FIPS_MODULE
OPENSSL_CTX *ctx = arg;
/*
@@ -353,14 +353,14 @@ int ossl_init_thread_start(const void *index, void *arg,
if (hands == NULL)
return 0;
#ifdef FIPS_MODE
#ifdef FIPS_MODULE
if (*hands == NULL) {
/*
* We've not yet registered any handlers for this thread. We need to get
* libcrypto to tell us about later thread stop events. c_thread_start
* is a callback to libcrypto defined in fipsprov.c
*/
if (!c_thread_start(FIPS_get_provider(ctx), ossl_ctx_thread_stop))
if (!c_thread_start(FIPS_get_core_handle(ctx), ossl_ctx_thread_stop))
return 0;
}
#endif
@@ -378,7 +378,7 @@ int ossl_init_thread_start(const void *index, void *arg,
return 1;
}
#ifndef FIPS_MODE
#ifndef FIPS_MODULE
static int init_thread_deregister(void *index, int all)
{
GLOBAL_TEVENT_REGISTER *gtr;