diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-19 08:47:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-19 08:47:39 +0000 |
commit | c453ec8380cd10de27fca8d8f0cbfd50058890db (patch) | |
tree | 026b1943f5b7dc0dbeb40524ec70b34d96f7cea8 /src/net_doh.c | |
parent | Adding upstream version 2.12.0. (diff) | |
download | dnsperf-upstream/2.13.0.tar.xz dnsperf-upstream/2.13.0.zip |
Adding upstream version 2.13.0.upstream/2.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/net_doh.c')
-rw-r--r-- | src/net_doh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net_doh.c b/src/net_doh.c index 2caeab8..56fd7ef 100644 --- a/src/net_doh.c +++ b/src/net_doh.c @@ -184,6 +184,9 @@ static void perf__doh_connect(struct perf_net_socket* sock) if (!(self->ssl = SSL_new(ssl_ctx))) { perf_log_fatal("SSL_new(): %s", ERR_error_string(ERR_get_error(), 0)); } + if (perf_net_tls_sni && !(ret = SSL_set_tlsext_host_name(self->ssl, perf_net_tls_sni))) { + perf_log_fatal("SSL_set_tlsext_host_name(): %s", ERR_error_string(SSL_get_error(self->ssl, ret), 0)); + } if (!(ret = SSL_set_fd(self->ssl, sock->fd))) { perf_log_fatal("SSL_set_fd(): %s", ERR_error_string(SSL_get_error(self->ssl, ret), 0)); } |