From 712c51e28354a8b94fc8863f0fdc6b0e684d379c Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Mon, 23 May 2016 20:39:55 -0400 Subject: [PATCH] Fix TLS with eventlet (#2151) * Fix TLS with eventlet This fixes a simple error on my part when implementing the WSGI stuff. eventlet.wrap_ssl() returns a wrapped socket, it does not modify the object passed to it. We need to grab the returned value and use that. * Fix style issue --- homeassistant/components/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/http.py b/homeassistant/components/http.py index 8647f3c97c6..06fa09bb138 100644 --- a/homeassistant/components/http.py +++ b/homeassistant/components/http.py @@ -243,8 +243,8 @@ class HomeAssistantWSGI(object): sock = eventlet.listen((self.server_host, self.server_port)) if self.ssl_certificate: - eventlet.wrap_ssl(sock, certfile=self.ssl_certificate, - keyfile=self.ssl_key, server_side=True) + sock = eventlet.wrap_ssl(sock, certfile=self.ssl_certificate, + keyfile=self.ssl_key, server_side=True) wsgi.server(sock, self) def dispatch_request(self, request):