Commit a1687f7855cabed8adde9457d76c51cc2ce4cf38

Carlos Martín Nieto 2015-07-10T19:07:41

Merge pull request #3297 from tkelman/patch-2 Fix undefined reference with old versions of openssl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/openssl_stream.c b/src/openssl_stream.c
index 1bd4f14..8ff53d4 100644
--- a/src/openssl_stream.c
+++ b/src/openssl_stream.c
@@ -324,7 +324,9 @@ int openssl_connect(git_stream *stream)
 
 	SSL_set_bio(st->ssl, bio, bio);
 	/* specify the host in case SNI is needed */
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
 	SSL_set_tlsext_host_name(st->ssl, st->host);
+#endif
 
 	if ((ret = SSL_connect(st->ssl)) <= 0)
 		return ssl_set_error(st->ssl, ret);