summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar orbea2023-04-11 08:40:11 -0700
committerGravatar Nikias Bassen2023-12-16 00:50:57 +0100
commitd86140ff5a8f2c6a006644dc8194f55ca6fd52c1 (patch)
tree75239a038517d7f53e64a11daa5e718f1ab2199c
parent54135e4a748b814fd1d1cc66133151afb7831451 (diff)
downloadlibimobiledevice-d86140ff5a8f2c6a006644dc8194f55ca6fd52c1.tar.gz
libimobiledevice-d86140ff5a8f2c6a006644dc8194f55ca6fd52c1.tar.bz2
lockdown-cu: Fix the build with LibreSSL >= 3.5.0
In LibreSSL >= 3.5.0 many structs are defined as opaque as they are in OpenSSL 1.1.
-rw-r--r--src/lockdown-cu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lockdown-cu.c b/src/lockdown-cu.c
index d8d7f42..e527652 100644
--- a/src/lockdown-cu.c
+++ b/src/lockdown-cu.c
@@ -294,7 +294,7 @@ poly1305_update_with_pad16(poly1305_state *poly1305,
static void chacha20_poly1305_encrypt_96(unsigned char* key, unsigned char* nonce, unsigned char* ad, size_t ad_len, unsigned char* in, size_t in_len, unsigned char* out, size_t* out_len)
{
#if defined(HAVE_OPENSSL)
-#if defined(LIBRESSL_VERSION_NUMBER)
+#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3050000fL)
#if (LIBRESSL_VERSION_NUMBER >= 0x2040000fL)
const EVP_AEAD *aead = EVP_aead_chacha20_poly1305();
EVP_AEAD_CTX ctx;
@@ -378,7 +378,7 @@ static void chacha20_poly1305_encrypt_64(unsigned char* key, unsigned char* nonc
static void chacha20_poly1305_decrypt_96(unsigned char* key, unsigned char* nonce, unsigned char* ad, size_t ad_len, unsigned char* in, size_t in_len, unsigned char* out, size_t* out_len)
{
#if defined(HAVE_OPENSSL)
-#if defined(LIBRESSL_VERSION_NUMBER)
+#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3050000fL)
#if (LIBRESSL_VERSION_NUMBER >= 0x2040000fL)
const EVP_AEAD *aead = EVP_aead_chacha20_poly1305();
EVP_AEAD_CTX ctx;