MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / auth

Method auth

tools/python-3.11.9-amd64/Lib/ftplib.py:748–758  ·  view source on GitHub ↗

Set up secure control connection by using TLS/SSL.

(self)

Source from the content-addressed store, hash-verified

746 return super().login(user, passwd, acct)
747
748 def auth(self):
749 '''Set up secure control connection by using TLS/SSL.'''
750 if isinstance(self.sock, ssl.SSLSocket):
751 raise ValueError("Already using TLS")
752 if self.ssl_version >= ssl.PROTOCOL_TLS:
753 resp = self.voidcmd('AUTH TLS')
754 else:
755 resp = self.voidcmd('AUTH SSL')
756 self.sock = self.context.wrap_socket(self.sock, server_hostname=self.host)
757 self.file = self.sock.makefile(mode='r', encoding=self.encoding)
758 return resp
759
760 def ccc(self):
761 '''Switch back to a clear-text control connection.'''

Callers 1

loginMethod · 0.95

Calls 3

voidcmdMethod · 0.80
wrap_socketMethod · 0.45
makefileMethod · 0.45

Tested by

no test coverage detected