Skip to content

Commit c801caf

Browse files
Teppo JärvelinAntti Kauppila
authored andcommitted
fixed ssl hostname handling
1 parent 163e5c9 commit c801caf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/netsocket/TLSSocketWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ nsapi_error_t TLSSocketWrapper::start_handshake(bool first_call)
175175
return continue_handshake();
176176
}
177177

178-
#ifdef MBEDTLS_X509_CRT_PARSE_C
178+
#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_HOSTNAME_VERIFICATION)
179179
tr_info("Starting TLS handshake with %s", _ssl.hostname);
180180
#else
181181
tr_info("Starting TLS handshake");
@@ -267,7 +267,7 @@ nsapi_error_t TLSSocketWrapper::continue_handshake()
267267
}
268268
}
269269

270-
#ifdef MBEDTLS_X509_CRT_PARSE_C
270+
#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_HOSTNAME_VERIFICATION)
271271
/* It also means the handshake is done, time to print info */
272272
tr_info("TLS connection to %s established", _ssl.hostname);
273273
#else

0 commit comments

Comments
 (0)