summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2020-12-10 11:30:02 +0100
committerPetr Štetiar <ynezz@true.cz>2020-12-10 12:18:05 +0100
commit2c342ae57c5bd9fb99f69a4dd06a5a6e49eac7de (patch)
tree86f9c848e7aa089a7826b5f67fd36c5f2bd79142
parentfa8ecd6ed14036256e43cfe8ebaf52770e6e0826 (diff)
downloadustream-ssl-2c342ae57c5bd9fb99f69a4dd06a5a6e49eac7de.tar.gz
ustream-openssl: fix wolfSSL includes
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>
-rw-r--r--ustream-openssl.c3
-rw-r--r--ustream-openssl.h6
2 files changed, 7 insertions, 2 deletions
diff --git a/ustream-openssl.c b/ustream-openssl.c
index f8e848d..dec2b9f 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -20,7 +20,10 @@
#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.
diff --git a/ustream-openssl.h b/ustream-openssl.h
index 0a6ca91..9663d21 100644
--- a/ustream-openssl.h
+++ b/ustream-openssl.h
@@ -21,10 +21,12 @@
#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);