mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Merge remote-tracking branch 'public/bug26005_034'
This commit is contained in:
commit
e6d6347690
4 changed files with 9 additions and 9 deletions
|
@ -115,7 +115,7 @@ aes_cipher_free_(aes_cnt_cipher_t *cipher_)
|
||||||
if (!cipher_)
|
if (!cipher_)
|
||||||
return;
|
return;
|
||||||
EVP_CIPHER_CTX *cipher = (EVP_CIPHER_CTX *) cipher_;
|
EVP_CIPHER_CTX *cipher = (EVP_CIPHER_CTX *) cipher_;
|
||||||
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
|
#ifdef OPENSSL_1_1_API
|
||||||
EVP_CIPHER_CTX_reset(cipher);
|
EVP_CIPHER_CTX_reset(cipher);
|
||||||
#else
|
#else
|
||||||
EVP_CIPHER_CTX_cleanup(cipher);
|
EVP_CIPHER_CTX_cleanup(cipher);
|
||||||
|
|
|
@ -169,7 +169,7 @@ crypto_early_init(void)
|
||||||
|
|
||||||
crypto_early_initialized_ = 1;
|
crypto_early_initialized_ = 1;
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
|
#ifdef OPENSSL_1_1_API
|
||||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
|
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
|
||||||
OPENSSL_INIT_LOAD_CRYPTO_STRINGS |
|
OPENSSL_INIT_LOAD_CRYPTO_STRINGS |
|
||||||
OPENSSL_INIT_ADD_ALL_CIPHERS |
|
OPENSSL_INIT_ADD_ALL_CIPHERS |
|
||||||
|
@ -1062,13 +1062,13 @@ crypto_dh_free_(crypto_dh_t *dh)
|
||||||
int
|
int
|
||||||
crypto_global_cleanup(void)
|
crypto_global_cleanup(void)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0)
|
#ifndef OPENSSL_1_1_API
|
||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
#endif
|
#endif
|
||||||
#ifndef NEW_THREAD_API
|
#ifndef NEW_THREAD_API
|
||||||
ERR_remove_thread_state(NULL);
|
ERR_remove_thread_state(NULL);
|
||||||
#endif
|
#endif
|
||||||
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0)
|
#ifndef OPENSSL_1_1_API
|
||||||
ERR_free_strings();
|
ERR_free_strings();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1082,13 +1082,13 @@ crypto_global_cleanup(void)
|
||||||
dh_param_p = dh_param_p_tls = dh_param_g = NULL;
|
dh_param_p = dh_param_p_tls = dh_param_g = NULL;
|
||||||
|
|
||||||
#ifndef DISABLE_ENGINES
|
#ifndef DISABLE_ENGINES
|
||||||
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0)
|
#ifndef OPENSSL_1_1_API
|
||||||
ENGINE_cleanup();
|
ENGINE_cleanup();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CONF_modules_unload(1);
|
CONF_modules_unload(1);
|
||||||
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0)
|
#ifndef OPENSSL_1_1_API
|
||||||
CRYPTO_cleanup_all_ex_data();
|
CRYPTO_cleanup_all_ex_data();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ ENABLE_GCC_WARNING(redundant-decls)
|
||||||
#include "container.h"
|
#include "container.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
|
#ifdef OPENSSL_1_1_API
|
||||||
#define X509_get_notBefore_const(cert) \
|
#define X509_get_notBefore_const(cert) \
|
||||||
X509_get0_notBefore(cert)
|
X509_get0_notBefore(cert)
|
||||||
#define X509_get_notAfter_const(cert) \
|
#define X509_get_notAfter_const(cert) \
|
||||||
|
@ -372,7 +372,7 @@ tor_tls_init(void)
|
||||||
check_no_tls_errors();
|
check_no_tls_errors();
|
||||||
|
|
||||||
if (!tls_library_is_initialized) {
|
if (!tls_library_is_initialized) {
|
||||||
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
|
#ifdef OPENSSL_1_1_API
|
||||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
|
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
|
||||||
#else
|
#else
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
|
|
|
@ -205,7 +205,7 @@ test_tortls_tor_tls_get_error(void *data)
|
||||||
static void
|
static void
|
||||||
library_init(void)
|
library_init(void)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
|
#ifdef OPENSSL_1_1_API
|
||||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
|
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
|
||||||
#else
|
#else
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
|
|
Loading…
Add table
Reference in a new issue