ustream-openssl: fix wolfSSL includes
authorPetr Štetiar <ynezz@true.cz>
Thu, 10 Dec 2020 10:30:02 +0000 (11:30 +0100)
committerPetr Štetiar <ynezz@true.cz>
Thu, 10 Dec 2020 11:18:05 +0000 (12:18 +0100)
Fixes following compilation errors:

 ustream-io-wolfssl.c:74:2: error: implicit declaration of function 'wolfSSL_SetIORecv' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
 ustream-io-wolfssl.c:75:2: error: implicit declaration of function 'wolfSSL_SetIOSend' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
 ustream-io-wolfssl.c:79:2: error: implicit declaration of function 'wolfSSL_SetIOReadCtx' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
 ustream-io-wolfssl.c:80:2: error: implicit declaration of function 'wolfSSL_SetIOWriteCtx' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

Signed-off-by: Petr Štetiar <ynezz@true.cz>
ustream-openssl.c
ustream-openssl.h

index f8e848d69fb3244ff296375288d9de62984c93df..dec2b9f7816d50e944b2dbac346327bb2c27bee7 100644 (file)
 #include <ctype.h>
 #include "ustream-ssl.h"
 #include "ustream-internal.h"
+
+#if !defined(HAVE_WOLFSSL)
 #include <openssl/x509v3.h>
+#endif
 
 /* Ciphersuite preference:
  * - for server, no weak ciphers are used if you use an ECDSA key.
index 0a6ca91023d0f9b13fb8878610e56a5dbd4fecbc..9663d21ffd7033c4e886911d00b1cc77d7935dc8 100644 (file)
 
 #if defined(HAVE_WOLFSSL)
 #include <wolfssl/options.h>
-#endif
-
+#include <wolfssl/openssl/ssl.h>
+#else
 #include <openssl/ssl.h>
 #include <openssl/err.h>
+#endif
+
 #include <stdbool.h>
 
 void __ustream_ssl_session_free(void *ssl);