diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compat_openssl.h | 7 | ||||
-rw-r--r-- | src/test/test_tortls.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/common/compat_openssl.h b/src/common/compat_openssl.h index 1bfe188075..76679872bc 100644 --- a/src/common/compat_openssl.h +++ b/src/common/compat_openssl.h @@ -8,6 +8,8 @@ #define TOR_COMPAT_OPENSSL_H #include <openssl/opensslv.h> +// workaround for libressl; not needed in later Tor versions. +#include <openssl/crypto.h> /** * \file compat_openssl.h @@ -27,8 +29,11 @@ #define OPENSSL_1_1_API #endif -#ifndef OPENSSL_1_1_API +#ifndef OPENSSL_VERSION #define OPENSSL_VERSION SSLEAY_VERSION +#endif + +#ifndef OPENSSL_1_1_API #define OpenSSL_version(v) SSLeay_version(v) #define OpenSSL_version_num() SSLeay() #define RAND_OpenSSL() RAND_SSLeay() diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c index 47455cff83..5028a95400 100644 --- a/src/test/test_tortls.c +++ b/src/test/test_tortls.c @@ -840,8 +840,10 @@ test_tortls_classify_client_ciphers(void *ignored) sk_SSL_CIPHER_zero(ciphers); one = get_cipher_by_name("ECDHE-RSA-AES256-GCM-SHA384"); + tt_assert(one); one->id = 0x00ff; two = get_cipher_by_name("ECDHE-RSA-AES128-GCM-SHA256"); + tt_assert(two); two->id = 0x0000; sk_SSL_CIPHER_push(ciphers, one); tls->client_cipher_list_type = 0; @@ -912,6 +914,7 @@ test_tortls_client_is_using_v2_ciphers(void *ignored) ciphers = sk_SSL_CIPHER_new_null(); SSL_CIPHER *one = get_cipher_by_name("ECDHE-RSA-AES256-GCM-SHA384"); + tt_assert(one); one->id = 0x00ff; sk_SSL_CIPHER_push(ciphers, one); sess->ciphers = ciphers; |