summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--ustream-openssl.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f53e726..2de6590 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,8 @@ TARGET_LINK_LIBRARIES(ustream-example-server ustream-ssl)
ADD_EXECUTABLE(ustream-example-client ustream-example-client.c)
TARGET_LINK_LIBRARIES(ustream-example-client ustream-ssl)
+TARGET_COMPILE_DEFINITIONS(ustream-ssl PRIVATE $<$<CONFIG:Debug>:DEBUG>)
+
INSTALL(FILES ustream-ssl.h
DESTINATION include/libubox
)
diff --git a/ustream-openssl.c b/ustream-openssl.c
index 894dddb..6dae4ae 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -25,6 +25,10 @@
#include <openssl/x509v3.h>
#endif
+#if defined(HAVE_WOLFSSL) && defined(DEBUG)
+#include <wolfssl/test.h>
+#endif
+
/* Ciphersuite preference:
* - for server, no weak ciphers are used if you use an ECDSA key.
* - forward-secret (pfs), authenticated (AEAD) ciphers are at the top:
@@ -268,6 +272,10 @@ static void ustream_ssl_verify_cert(struct ustream_ssl *us)
X509 *cert;
int res;
+#if defined(HAVE_WOLFSSL) && defined(DEBUG)
+ showPeer(ssl);
+#endif
+
res = SSL_get_verify_result(ssl);
if (res != X509_V_OK) {
if (us->notify_verify_error)