]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix building against OpenSSL 3
authorJouke Witteveen <j.witteveen@gmail.com>
Mon, 15 Jan 2024 17:57:52 +0000 (18:57 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 20 Jan 2024 07:39:49 +0000 (09:39 +0200)
Smartcard support uses the ENGINE API of OpenSSL, which has been
deprecated as of OpenSSL 3. Rather than migrating the code to the new API
or pretending that we do not support OpenSSL 3, accept that we use
deprecated functionality.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
src/crypto/tls_openssl.c

index 5aff0d16187108e8404885f1ceae50eaf37a8530..17283f99817a459103fd52c156fbb47a09b4428a 100644 (file)
 #endif
 #endif
 
+#ifndef OPENSSL_NO_ENGINE
+/* OpenSSL 3.0 has moved away from the engine API */
+#define OPENSSL_SUPPRESS_DEPRECATED
+#include <openssl/engine.h>
+#endif /* OPENSSL_NO_ENGINE */
 #include <openssl/ssl.h>
 #include <openssl/err.h>
 #include <openssl/opensslv.h>
 #include <openssl/pkcs12.h>
 #include <openssl/x509v3.h>
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif /* OPENSSL_NO_ENGINE */
 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
 #include <openssl/core_names.h>
 #include <openssl/decoder.h>