ustream-openssl: wolfSSL: provide detailed information in debug builds
[project/ustream-ssl.git] / ustream-openssl.c
index 894dddb5afb1de7183284f7018243a1aeea581f6..6dae4aedb752894684c719954e74c13f628c3027 100644 (file)
 #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)