diff options
author | Cristian Oneț <cristian.onet@audionowdigital.com> | 2015-05-20 18:03:54 +0300 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-22 18:17:35 +0200 |
commit | c62ab5f5dad62e9a381314e81d188c506e9ef0b7 (patch) | |
tree | 0af45c512bfb84130c0c0a71c9567fa2b6f55e2f | |
parent | 12d8fbb3ce0fa3a4edc4f8eb868d42575248806d (diff) | |
download | libgit2-c62ab5f5dad62e9a381314e81d188c506e9ef0b7.tar.gz |
Call the openssl API to be able to work with SNI servers.
-rw-r--r-- | src/openssl_stream.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openssl_stream.c b/src/openssl_stream.c index 9ddf6e4be..96d1201d0 100644 --- a/src/openssl_stream.c +++ b/src/openssl_stream.c @@ -243,6 +243,9 @@ int openssl_connect(git_stream *stream) return ssl_set_error(st->ssl, ret); } + /* specify the host in case SNI is needed */ + SSL_set_tlsext_host_name(st->ssl, st->socket->host); + if ((ret = SSL_connect(st->ssl)) <= 0) return ssl_set_error(st->ssl, ret); |