Skip to content

Commit

Permalink
mbedtls: fix compile on mbedtls 3.6+
Browse files Browse the repository at this point in the history
they moved mbedtls_x509_get_name into interal zone.

Signed-off-by: Seo Suchan <[email protected]>
  • Loading branch information
orangepizza authored and lws-team committed May 7, 2024
1 parent e820283 commit 026710d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tls/mbedtls/mbedtls-extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ lws_mbedtls_x509_parse_general_name(const mbedtls_x509_buf *name_buf,
*p = *p - 2;

rfc822Name.MBEDTLS_PRIVATE_V30_ONLY(next) = NULL;
ret = mbedtls_x509_get_name( p, end, &rfc822Name );
#if (MBEDTLS_VERSION_MAJOR == 3) && (MBEDTLS_VERSION_MINOR >= 6)
ret = MBEDTLS_PRIVATE(mbedtls_x509_get_name( p, end, &rfc822Name ));
#else
ret = mbedtls_x509_get_name( p, end, &rfc822Name );
#endif
if (ret) {
lws_x509_clean_name(&rfc822Name);
return ret;
Expand Down
6 changes: 6 additions & 0 deletions lib/tls/mbedtls/private-lib-tls-mbedtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ lws_tls_mbedtls_cert_info(mbedtls_x509_crt *x509, enum lws_tls_cert_info type,
int
lws_x509_get_crt_ext(mbedtls_x509_crt *crt, mbedtls_x509_buf *skid,
lws_mbedtls_x509_authority *akid);

#if (MBEDTLS_VERSION_MAJOR == 3) && (MBEDTLS_VERSION_MINOR >= 6)
int MBEDTLS_PRIVATE(mbedtls_x509_get_name(unsigned char **p, const unsigned char *end,
mbedtls_x509_name *cur));
#endif

0 comments on commit 026710d

Please sign in to comment.