mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
72 lines
2.6 KiB
Diff
72 lines
2.6 KiB
Diff
diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c
|
|
index 19e0e2b..35f5ddf 100644
|
|
--- a/src/crypto/crypto_openssl.c
|
|
+++ b/src/crypto/crypto_openssl.c
|
|
@@ -33,7 +33,7 @@
|
|
#include "aes_wrap.h"
|
|
#include "crypto.h"
|
|
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
|
/* Compatibility wrappers for older versions. */
|
|
|
|
static HMAC_CTX * HMAC_CTX_new(void)
|
|
@@ -611,7 +611,7 @@ void crypto_cipher_deinit(struct crypto_cipher *ctx)
|
|
|
|
void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
|
|
{
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
DH *dh;
|
|
struct wpabuf *pubkey = NULL, *privkey = NULL;
|
|
size_t publen, privlen;
|
|
@@ -712,7 +712,7 @@ err:
|
|
|
|
void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ)
|
|
{
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
DH *dh;
|
|
|
|
dh = DH_new();
|
|
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
|
|
index 23ac64b..ec42b1a 100644
|
|
--- a/src/crypto/tls_openssl.c
|
|
+++ b/src/crypto/tls_openssl.c
|
|
@@ -59,7 +59,7 @@ typedef int stack_index_t;
|
|
#endif /* SSL_set_tlsext_status_type */
|
|
|
|
#if (OPENSSL_VERSION_NUMBER < 0x10100000L || \
|
|
- defined(LIBRESSL_VERSION_NUMBER)) && \
|
|
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)) && \
|
|
!defined(BORINGSSL_API_VERSION)
|
|
/*
|
|
* SSL_get_client_random() and SSL_get_server_random() were added in OpenSSL
|
|
@@ -919,7 +919,7 @@ void * tls_init(const struct tls_config *conf)
|
|
}
|
|
#endif /* OPENSSL_FIPS */
|
|
#endif /* CONFIG_FIPS */
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
SSL_load_error_strings();
|
|
SSL_library_init();
|
|
#ifndef OPENSSL_NO_SHA256
|
|
@@ -1043,7 +1043,7 @@ void tls_deinit(void *ssl_ctx)
|
|
|
|
tls_openssl_ref_count--;
|
|
if (tls_openssl_ref_count == 0) {
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
#ifndef OPENSSL_NO_ENGINE
|
|
ENGINE_cleanup();
|
|
#endif /* OPENSSL_NO_ENGINE */
|
|
@@ -2334,7 +2334,7 @@ static int tls_connection_client_cert(struct tls_connection *conn,
|
|
return 0;
|
|
|
|
#ifdef PKCS12_FUNCS
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10002000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
/*
|
|
* Clear previously set extra chain certificates, if any, from PKCS#12
|
|
* processing in tls_parse_pkcs12() to allow OpenSSL to build a new
|