Skip to content

Commit f3996c2

Browse files
committed
mbedtls: configs: inet_pton fallback
`x509_crt.c` relies on an implementation of `inet_pton`, unless `MBEDTLS_TEST_SW_INET_PTON` is defined. Since `inet_pton` is only defined when `POSIX_NETWORKING` is, define the software fallback if it is not. Signed-off-by: Jordan Yates <[email protected]>
1 parent 0648e49 commit f3996c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/mbedtls/configs/config-mbedtls.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@
404404
defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) || \
405405
defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED)
406406
#define MBEDTLS_X509_CRT_PARSE_C
407+
#ifndef CONFIG_POSIX_NETWORKING
408+
#define MBEDTLS_TEST_SW_INET_PTON
409+
#endif
407410
#endif
408411

409412
#if defined(CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT) && \

0 commit comments

Comments
 (0)