1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Merge pull request #8627 from tom-cosgrove-arm/ip_len

Avoid use of `ip_len` as it clashes with a macro in AIX system headers
This commit is contained in:
Bence Szépkúti
2023-12-18 02:03:17 +00:00
committed by GitHub
4 changed files with 15 additions and 15 deletions

View File

@@ -261,10 +261,10 @@ usage:
} else if (strcmp(q, "DNS") == 0) {
cur->node.type = MBEDTLS_X509_SAN_DNS_NAME;
} else if (strcmp(q, "IP") == 0) {
size_t ip_len = 0;
size_t ip_addr_len = 0;
cur->node.type = MBEDTLS_X509_SAN_IP_ADDRESS;
ip_len = mbedtls_x509_crt_parse_cn_inet_pton(subtype_value, ip);
if (ip_len == 0) {
ip_addr_len = mbedtls_x509_crt_parse_cn_inet_pton(subtype_value, ip);
if (ip_addr_len == 0) {
mbedtls_printf("mbedtls_x509_crt_parse_cn_inet_pton failed to parse %s\n",
subtype_value);
goto exit;

View File

@@ -583,10 +583,10 @@ usage:
} else if (strcmp(q, "DNS") == 0) {
cur->node.type = MBEDTLS_X509_SAN_DNS_NAME;
} else if (strcmp(q, "IP") == 0) {
size_t ip_len = 0;
size_t ip_addr_len = 0;
cur->node.type = MBEDTLS_X509_SAN_IP_ADDRESS;
ip_len = mbedtls_x509_crt_parse_cn_inet_pton(subtype_value, ip);
if (ip_len == 0) {
ip_addr_len = mbedtls_x509_crt_parse_cn_inet_pton(subtype_value, ip);
if (ip_addr_len == 0) {
mbedtls_printf("mbedtls_x509_crt_parse_cn_inet_pton failed to parse %s\n",
subtype_value);
goto exit;