Sfoglia il codice sorgente

Merge pull request #1208 from DL6ER/fix/mbedtls

Fix compiling CivetWeb + mbedTLS in DEBUG mode
bel2125 1 anno fa
parent
commit
641596d0c7
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      src/mod_mbedtls.inl

+ 8 - 0
src/mod_mbedtls.inl

@@ -188,7 +188,11 @@ mbed_ssl_accept(mbedtls_ssl_context **ssl,
 		return -1;
 	}
 
+#if MBEDTLS_VERSION_NUMBER >= 0x03000000
+	DEBUG_TRACE("TLS connection %p accepted, state: %d", ssl, (*ssl)->MBEDTLS_PRIVATE(state));
+#else
 	DEBUG_TRACE("TLS connection %p accepted, state: %d", ssl, (*ssl)->state);
+#endif
 	return 0;
 }
 
@@ -214,7 +218,11 @@ mbed_ssl_handshake(mbedtls_ssl_context *ssl)
 		}
 	}
 
+#if MBEDTLS_VERSION_NUMBER >= 0x03000000
+	DEBUG_TRACE("TLS handshake rc: %d, state: %d", rc, ssl->MBEDTLS_PRIVATE(state));
+#else
 	DEBUG_TRACE("TLS handshake rc: %d, state: %d", rc, ssl->state);
+#endif
 	return rc;
 }