mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
Libwebsockets: temp fix for mbedtls 3.6+
3.6 removed mbedtls_x509_get_cert into private header, redefined it in resonable place to temperatly fix it, and make it not depend on mbedtls_version_C. everything is upstreamed so won't need when upstrea release 4.3.4 Signed-off-by: Seo Suchan <tjtncks@gmail.com>
This commit is contained in:
@@ -61,7 +61,7 @@ endef
|
|||||||
define Package/libwebsockets-mbedtls
|
define Package/libwebsockets-mbedtls
|
||||||
$(call Package/$(PKG_NAME)/Default)
|
$(call Package/$(PKG_NAME)/Default)
|
||||||
TITLE += (mbedTLS)
|
TITLE += (mbedTLS)
|
||||||
DEPENDS += +libmbedtls @MBEDTLS_VERSION_C
|
DEPENDS += +libmbedtls
|
||||||
VARIANT:=mbedtls
|
VARIANT:=mbedtls
|
||||||
PROVIDES:=libwebsockets
|
PROVIDES:=libwebsockets
|
||||||
CONFLICTS:=libwebsockets-openssl
|
CONFLICTS:=libwebsockets-openssl
|
||||||
|
|||||||
23
libs/libwebsockets/patches/110-mbedtls36_compilefix.patch
Normal file
23
libs/libwebsockets/patches/110-mbedtls36_compilefix.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From 017dfcb144c557bb4bc72669168ad7b70a34ce57 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Seo Suchan <tjtncks@gmail.com>
|
||||||
|
Date: Fri, 3 May 2024 17:18:46 +0900
|
||||||
|
Subject: [PATCH 1/2] mbedtls: fix compile on mbedtls 3.6+ they moved
|
||||||
|
mbedtls_x509_get_name into interal zone, this declares it again in a file I
|
||||||
|
looked approperate to hold one
|
||||||
|
|
||||||
|
Signed-off-by: Seo Suchan <tjtncks@gmail.com>
|
||||||
|
---
|
||||||
|
lib/tls/mbedtls/private-lib-tls-mbedtls.h | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
--- a/lib/tls/mbedtls/private-lib-tls-mbedtls.h
|
||||||
|
+++ b/lib/tls/mbedtls/private-lib-tls-mbedtls.h
|
||||||
|
@@ -57,3 +57,8 @@ lws_tls_mbedtls_cert_info(mbedtls_x509_c
|
||||||
|
int
|
||||||
|
lws_x509_get_crt_ext(mbedtls_x509_crt *crt, mbedtls_x509_buf *skid,
|
||||||
|
lws_mbedtls_x509_authority *akid);
|
||||||
|
+
|
||||||
|
+/* redefine hidden mbedtls internal functions*/
|
||||||
|
+int
|
||||||
|
+mbedtls_x509_get_name(unsigned char **p, const unsigned char *end,
|
||||||
|
+ mbedtls_x509_name *cur);
|
||||||
36
libs/libwebsockets/patches/120-removed-mbedtlsverc.patch
Normal file
36
libs/libwebsockets/patches/120-removed-mbedtlsverc.patch
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
From adcc5a1ccb9f6ffe9fca793ea67e6c3e7ad8274a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Seo Suchan <tjtncks@gmail.com>
|
||||||
|
Date: Tue, 7 May 2024 12:46:08 +0900
|
||||||
|
Subject: [PATCH 2/2] mbedtls: make it no longer depend on mbedtls_version_c
|
||||||
|
complie flag
|
||||||
|
|
||||||
|
everything that code does is already done as macro constants
|
||||||
|
and openwrt doesn't build with mbedtls with that flag by default
|
||||||
|
|
||||||
|
Signed-off-by: Seo Suchan <tjtncks@gmail.com>
|
||||||
|
---
|
||||||
|
lib/core/context.c | 13 ++++++++----
|
||||||
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/core/context.c
|
||||||
|
+++ b/lib/core/context.c
|
||||||
|
@@ -788,11 +788,15 @@ lws_create_context(const struct lws_cont
|
||||||
|
#endif /* network */
|
||||||
|
|
||||||
|
#if defined(LWS_WITH_MBEDTLS)
|
||||||
|
- mbedtls_version_get_string(mbedtls_version);
|
||||||
|
-#endif
|
||||||
|
+ {
|
||||||
|
|
||||||
|
-#if defined(LWS_WITH_MBEDTLS)
|
||||||
|
- lwsl_cx_notice(context, "LWS: %s, MbedTLS-%s %s%s", library_version, mbedtls_version, opts_str, s);
|
||||||
|
+#if defined(MBEDTLS_VERSION_C)
|
||||||
|
+ mbedtls_version_get_string(mbedtls_version);
|
||||||
|
+#else
|
||||||
|
+ lws_snprintf(mbedtls_version, sizeof(mbedtls_version), "%s", MBEDTLS_VERSION_STRING);
|
||||||
|
+#endif
|
||||||
|
+ lwsl_cx_notice(context, "LWS: %s, MbedTLS-%s %s%s", library_version, mbedtls_version, opts_str, s);
|
||||||
|
+ }
|
||||||
|
#else
|
||||||
|
lwsl_cx_notice(context, "LWS: %s, %s%s", library_version, opts_str, s);
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user