-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
7157d5a
commit 4040362
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- a/lib/core/context.c | ||
+++ b/lib/core/context.c | ||
@@ -386,9 +386,6 @@ lws_create_context(const struct lws_cont | ||
#if defined(LWS_WITH_CACHE_NSCOOKIEJAR) && defined(LWS_WITH_CLIENT) | ||
struct lws_cache_creation_info ci; | ||
#endif | ||
-#if defined(LWS_WITH_MBEDTLS) | ||
- char mbedtls_version[32]; | ||
-#endif | ||
|
||
#if defined(__ANDROID__) | ||
struct rlimit rt; | ||
@@ -788,10 +785,12 @@ lws_create_context(const struct lws_cont | ||
#endif /* network */ | ||
|
||
#if defined(LWS_WITH_MBEDTLS) | ||
- mbedtls_version_get_string(mbedtls_version); | ||
+ char mbedtls_version[32]; | ||
+#if defined(MBEDTLS_VERSION_C) | ||
+ mbedtls_version_get_string(mbedtls_version); | ||
+#else | ||
+ lws_snprintf(mbedtls_version, sizeof(mbedtls_version), "%s", MBEDTLS_VERSION_STRING); | ||
#endif | ||
- | ||
-#if defined(LWS_WITH_MBEDTLS) | ||
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- 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); |