#include <openssl/buffer.h>
#include <openssl/bio.h>
#include <openssl/err.h>
-
-DECLARE_LHASH_OF(ERR_STRING_DATA);
-DECLARE_LHASH_OF(ERR_STATE);
+#include <openssl/opensslconf.h>
+#include "err_lcl.h"
static void err_load_strings(int lib, ERR_STRING_DATA *str);
if (lockit)
CRYPTO_w_lock(CRYPTO_LOCK_ERR);
if (!int_error_hash && create) {
- CRYPTO_push_info("get_hash (err.c)");
int_error_hash = lh_ERR_STRING_DATA_new();
- CRYPTO_pop_info();
}
if (int_error_hash != NULL)
ret = int_error_hash;
if (lockit)
CRYPTO_w_lock(CRYPTO_LOCK_ERR);
if (!int_thread_hash && create) {
- CRYPTO_push_info("int_thread_get (err.c)");
int_thread_hash = lh_ERR_STATE_new();
- CRYPTO_pop_info();
}
if (int_thread_hash != NULL) {
int_thread_hash_references++;
if (int_thread_hash_references == 1
&& int_thread_hash
&& lh_ERR_STATE_num_items(int_thread_hash) == 0) {
+ int_thread_hash_references = 0;
lh_ERR_STATE_free(int_thread_hash);
int_thread_hash = NULL;
+ hash = NULL;
}
}
CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
int_thread_del_item(&tmp);
}
-#ifndef OPENSSL_NO_DEPRECATED
+#if OPENSSL_API_COMPAT < 0x10000000L
void ERR_remove_state(unsigned long pid)
{
ERR_remove_thread_state(NULL);