MCPcopy Create free account
hub / github.com/Syncplay/syncplay / handleTLS

Method handleTLS

syncplay/protocols.py:775–788  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

773 self.sendMessage({"TLS": message})
774
775 def handleTLS(self, message):
776 inquiry = message["startTLS"] if "startTLS" in message else None
777 if "send" in inquiry:
778 if not self.isLogged() and self._factory.serverAcceptsTLS:
779 lastEditCertTime = self._factory.checkLastEditCertTime()
780 if lastEditCertTime is not None and lastEditCertTime != self._factory.lastEditCertTime:
781 self._factory.updateTLSContextFactory()
782 if self._factory.options is not None:
783 self.sendTLS({"startTLS": "true"})
784 self.transport.startTLS(self._factory.options)
785 else:
786 self.sendTLS({"startTLS": "false"})
787 else:
788 self.sendTLS({"startTLS": "false"})
789
790
791class PingService(object):

Callers

nothing calls this directly

Calls 4

isLoggedMethod · 0.95
sendTLSMethod · 0.95
checkLastEditCertTimeMethod · 0.80

Tested by

no test coverage detected