Commit ac02a197 authored by Markus Wintermann's avatar Markus Wintermann

Don't set tlsext_host_name for NonBlockingHTTPBOSH, because it has no _owner

NonBlockingHTTPBOSH instance has no attribute _owner and therefor the Server
of the _owner cannot be set as tlsext_host_name. This should fix #8911. Maybe
additional work is needed to make HTTPBOSH work with XEP-0368.
parent a1e8cee4
Pipeline #1294 failed with stages
......@@ -458,7 +458,8 @@ class NonBlockingTLS(PlugIn):
tcpsock._sock)
tcpsock._sslObj.set_connect_state() # set to client mode
if self.alpn:
# NonBlockingHTTPBOSH instance has no attribute _owner
if self.alpn and hasattr(tcpsock, '_owner'):
# Set SNI EXT on the SSL Connection object, see XEP-0368
tcpsock._sslObj.set_tlsext_host_name(tcpsock._owner.Server.encode())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment