Add better certificate handling.
Certificate host names are now matched (using DNS, SRV, XMPPAddr, and Common Name), along with expiration check. Scheduled event to reset the stream once the server's cert expires. Handle invalid cert trust chains gracefully now.
This commit is contained in:
@@ -101,6 +101,9 @@ class ComponentXMPP(BaseXMPP):
|
||||
host = self.server_host
|
||||
if port is None:
|
||||
port = self.server_port
|
||||
|
||||
self.server_name = self.boundjid.host
|
||||
|
||||
log.debug("Connecting to %s:%s", host, port)
|
||||
return XMLStream.connect(self, host=host, port=port,
|
||||
use_ssl=use_ssl,
|
||||
|
||||
Reference in New Issue
Block a user