From dbe35d6c03c49e20186cc1c6fd52628302794fa5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 23 Jan 2022 00:16:34 +0100 Subject: bearssl: set the right SNI name --- lib/vtls/bearssl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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, + * Copyright (C) 2019 - 2022, Michael Forney, * * 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; -- cgit v1.2.1