Seemed easy enough, see attached patch, this fixes it for me.

Cheers,
Andre
From 988fcb2a8bfcdca439040e157cd040e5f3dccc51 Mon Sep 17 00:00:00 2001
From: Andre Heider <a.hei...@gmail.com>
Date: Wed, 22 Jun 2022 13:09:07 +0200
Subject: [PATCH] hostapd: fix compilation with OPENSSL_NO_DEPRECATED

This fixes the build with OpenSSL 1.1.1:
../src/crypto/crypto_openssl.c: In function 'crypto_rsa_oaep_sha256_decrypt':
../src/crypto/crypto_openssl.c:4404:49: error: 'RSA_PKCS1_OAEP_PADDING' undeclared (first use in this function)

Signed-off-by: Andre Heider <a.hei...@gmail.com>
---
 .../hostapd/patches/991-fix-compile.patch      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/package/network/services/hostapd/patches/991-fix-compile.patch b/package/network/services/hostapd/patches/991-fix-compile.patch
index d08efa08bd..7fd0e01af1 100644
--- a/package/network/services/hostapd/patches/991-fix-compile.patch
+++ b/package/network/services/hostapd/patches/991-fix-compile.patch
@@ -17,3 +17,21 @@
  	return 0;
  }
  
+--- a/src/crypto/crypto_openssl.c
++++ b/src/crypto/crypto_openssl.c
+@@ -16,6 +16,7 @@
+ #include <openssl/dh.h>
+ #include <openssl/hmac.h>
+ #include <openssl/rand.h>
++#include <openssl/rsa.h>
+ #include <openssl/pem.h>
+ #ifdef CONFIG_ECC
+ #include <openssl/ec.h>
+@@ -25,7 +26,6 @@
+ #include <openssl/provider.h>
+ #include <openssl/core_names.h>
+ #include <openssl/param_build.h>
+-#include <openssl/rsa.h>
+ #include <openssl/encoder.h>
+ #include <openssl/decoder.h>
+ #else /* OpenSSL version >= 3.0 */
-- 
2.35.1

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to