Skip to content

Commit 026710d

Browse files
orangepizzalws-team
authored andcommitted
mbedtls: fix compile on mbedtls 3.6+
they moved mbedtls_x509_get_name into interal zone. Signed-off-by: Seo Suchan <[email protected]>
1 parent e820283 commit 026710d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/tls/mbedtls/mbedtls-extensions.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,11 @@ lws_mbedtls_x509_parse_general_name(const mbedtls_x509_buf *name_buf,
250250
*p = *p - 2;
251251

252252
rfc822Name.MBEDTLS_PRIVATE_V30_ONLY(next) = NULL;
253-
ret = mbedtls_x509_get_name( p, end, &rfc822Name );
253+
#if (MBEDTLS_VERSION_MAJOR == 3) && (MBEDTLS_VERSION_MINOR >= 6)
254+
ret = MBEDTLS_PRIVATE(mbedtls_x509_get_name( p, end, &rfc822Name ));
255+
#else
256+
ret = mbedtls_x509_get_name( p, end, &rfc822Name );
257+
#endif
254258
if (ret) {
255259
lws_x509_clean_name(&rfc822Name);
256260
return ret;

lib/tls/mbedtls/private-lib-tls-mbedtls.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ lws_tls_mbedtls_cert_info(mbedtls_x509_crt *x509, enum lws_tls_cert_info type,
5757
int
5858
lws_x509_get_crt_ext(mbedtls_x509_crt *crt, mbedtls_x509_buf *skid,
5959
lws_mbedtls_x509_authority *akid);
60+
61+
#if (MBEDTLS_VERSION_MAJOR == 3) && (MBEDTLS_VERSION_MINOR >= 6)
62+
int MBEDTLS_PRIVATE(mbedtls_x509_get_name(unsigned char **p, const unsigned char *end,
63+
mbedtls_x509_name *cur));
64+
#endif
65+

0 commit comments

Comments
 (0)