瀏覽代碼

Merge pull request #1208 from DL6ER/fix/mbedtls

Fix compiling CivetWeb + mbedTLS in DEBUG mode
bel2125 1 年之前
父節點
當前提交
641596d0c7
共有 1 個文件被更改,包括 8 次插入0 次删除
  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;
 }