File links-sni.patch of Package links
--- links-2.7.orig/connect.c
+++ links-2.7/connect.c
@@ -556,6 +556,14 @@ static void connected(struct connection
if (!c->ssl) {
goto ssl_error;
}
+
+#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
+ unsigned char *server_hostname = get_host_name(c->url);
+ if(server_hostname)
+ SSL_set_tlsext_host_name(c->ssl, server_hostname);
+
+ mem_free(server_hostname);
+#endif
SSL_set_fd(c->ssl, *b->sock);
switch (SSL_get_error(c->ssl, SSL_connect(c->ssl))) {
case SSL_ERROR_WANT_READ: