From b95ed17f6b2905bdf2cca737888ea5fe26d5657d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 15 Apr 2022 12:19:52 +0300 Subject: [PATCH] OpenSSL: Fix build with BoringSSL and LibreSSL 3.3.x and older Define the EC_GROUP_get_curve() wrapper for the older versions. Fixes: 3c61f4db4c3b ("OpenSSL: Replace EC_GROUP_get_curve_GFp() calls with EC_GROUP_get_curve()") Signed-off-by: Jouni Malinen --- src/crypto/crypto_openssl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index a54ec71a8..e1b3d15fc 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -122,7 +122,10 @@ static const unsigned char * ASN1_STRING_get0_data(const ASN1_STRING *x) #endif /* OpenSSL version < 1.1.0 */ -#if OPENSSL_VERSION_NUMBER < 0x10101000L +#if OPENSSL_VERSION_NUMBER < 0x10101000L || \ + defined(OPENSSL_IS_BORINGSSL) || \ + (defined(LIBRESSL_VERSION_NUMBER) && \ + LIBRESSL_VERSION_NUMBER < 0x30400000L) static int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) {