diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-01-23 00:16:34 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-01-23 11:59:55 +0100 |
commit | dbe35d6c03c49e20186cc1c6fd52628302794fa5 (patch) | |
tree | 3e8fe230ffb4c798ebefa13675a5897d45564b85 | |
parent | 19ac2f640c6485caf9c85230b23db5320864b7ff (diff) | |
download | curl-dbe35d6c03c49e20186cc1c6fd52628302794fa5.tar.gz |
bearssl: set the right SNI name
-rw-r--r-- | lib/vtls/bearssl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/vtls/bearssl.c b/lib/vtls/bearssl.c index 9b772d064..f453ffc9e 100644 --- a/lib/vtls/bearssl.c +++ b/lib/vtls/bearssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2019 - 2021, Michael Forney, <mforney@mforney.org> + * Copyright (C) 2019 - 2022, Michael Forney, <mforney@mforney.org> * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -465,6 +465,12 @@ static CURLcode bearssl_connect_step1(struct Curl_easy *data, } hostname = NULL; } + else { + char *snihost = Curl_ssl_snihost(data, hostname, NULL); + if(!snihost) + return CURLE_SSL_CONNECT_ERROR; + hostname = snihost; + } if(!br_ssl_client_reset(&backend->ctx, hostname, 0)) return CURLE_FAILED_INIT; |