Browse Source

Fix for `wolfSSL_SESSION_print`

David Garske 3 years ago
parent
commit
95ff75c43d
2 changed files with 6 additions and 1 deletions
  1. 5 1
      examples/client/client.c
  2. 1 0
      src/ssl.c

+ 5 - 1
examples/client/client.c

@@ -3331,7 +3331,10 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
     }
 #endif
 
-#if defined(OPENSSL_EXTRA) && !defined(NO_SESSION_CACHE)
+#if defined(OPENSSL_ALL) || (defined(OPENSSL_EXTRA) && (defined(HAVE_STUNNEL) || \
+                             defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY) || \
+                             defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_OPENSSH)))
+#if !defined(NO_SESSION_CACHE)
     #ifndef NO_BIO
     /* print out session to stdout */
     {
@@ -3345,6 +3348,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
         wolfSSL_BIO_free(bio);
     }
     #endif /* !NO_BIO */
+#endif
 #endif
 
     if (doSTARTTLS && starttlsProt != NULL) {

+ 1 - 0
src/ssl.c

@@ -46262,6 +46262,7 @@ void* wolfSSL_SESSION_get_ex_data(const WOLFSSL_SESSION* session, int idx)
 }
 #endif /* OPENSSL_EXTRA || WOLFSSL_WPAS_SMALL || FORTRESS */
 
+/* Note: This is a huge section of API's - through wolfSSL_SESSION_print */
 #if defined(OPENSSL_ALL) || (defined(OPENSSL_EXTRA) && (defined(HAVE_STUNNEL) || \
                              defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY) || \
                              defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_OPENSSH)))