Files
mbedtls/tests
Gilles Peskine 551756df7c Require calling mbedtls_ssl_set_hostname() for security
In a TLS client, when using certificate authentication, the client should
check that the certificate is valid for the server name that the client
expects. Otherwise, in most scenarios, a malicious server can impersonate
another server.

Normally, the application code should call mbedtls_ssl_set_hostname().
However, it's easy to forget. So raise an error if mandatory certificate
authentication is in effect and mbedtls_ssl_set_hostname() has not been
called. Raise the new error code
MBEDTLS_ERR_SSL_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME, for easy
identification.

But don't raise the error if the backward compatibility option
MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME is
enabled.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-02-24 18:04:29 +01:00
..
2023-11-03 12:54:54 +00:00
2023-11-06 10:06:03 +08:00
2023-11-03 12:54:54 +00:00
2023-11-03 12:54:54 +00:00
2024-06-26 19:52:12 +02:00
2023-03-16 11:10:17 +08:00
2023-11-03 12:54:54 +00:00
2024-05-30 15:14:40 +02:00
2023-11-03 12:54:54 +00:00
2023-11-03 12:54:54 +00:00
2023-03-16 11:10:17 +08:00
2023-11-03 12:54:54 +00:00