mirror of
https://github.com/curl/curl.git
synced 2026-08-15 05:03:39 +03:00
mbedtls: fix pytest for newer versions
Fix the expectations in pytest for newer versions of mbedtls Closes #13132
This commit is contained in:
parent
79cdae4fc7
commit
3d0fd382a2
3 changed files with 24 additions and 13 deletions
|
|
@ -687,14 +687,13 @@ mbed_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
&backend->clicert, &backend->pk);
|
||||
}
|
||||
|
||||
if(connssl->peer.sni) {
|
||||
if(mbedtls_ssl_set_hostname(&backend->ssl, connssl->peer.sni)) {
|
||||
/* mbedtls_ssl_set_hostname() sets the name to use in CN/SAN checks and
|
||||
the name to set in the SNI extension. So even if curl connects to a
|
||||
host specified as an IP address, this function must be used. */
|
||||
failf(data, "Failed to set SNI");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
if(mbedtls_ssl_set_hostname(&backend->ssl, connssl->peer.sni?
|
||||
connssl->peer.sni : connssl->peer.hostname)) {
|
||||
/* mbedtls_ssl_set_hostname() sets the name to use in CN/SAN checks and
|
||||
the name to set in the SNI extension. So even if curl connects to a
|
||||
host specified as an IP address, this function must be used. */
|
||||
failf(data, "Failed to set SNI");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
#ifdef HAS_ALPN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue