[OpenWrt-Devel] [PATCH] uclient-fetch: set server_name of the ssl context to support SNI

Alexander Couzens lynxis at fe80.eu
Thu Aug 6 07:02:47 EDT 2015


Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 uclient-http.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/uclient-http.c b/uclient-http.c
index d96094d..4300d05 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -826,6 +826,7 @@ static int uclient_setup_https(struct uclient_http *uh)
 	uh->ussl.notify_error = uclient_ssl_notify_error;
 	uh->ussl.notify_verify_error = uclient_ssl_notify_verify_error;
 	uh->ussl.notify_connected = uclient_ssl_notify_connected;
+	uh->ussl.server_name = uh->uc.url->host;
 	uh->ssl_ops->init(&uh->ussl, &uh->ufd.stream, uh->ssl_ctx, false);
 	uh->ssl_ops->set_peer_cn(&uh->ussl, uh->uc.url->host);
 
-- 
2.5.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list