3

I have python script which uses FTP_TLS to get access to FTPS server. When I try to do_handshake next error appears:

  File "/usr/local/lib/python3.7/ftplib.py", line 749, in login
    self.auth()
  File "/usr/local/lib/python3.7/ftplib.py", line 761, in auth
    server_hostname=host)
  File "/usr/local/lib/python3.7/ssl.py", line 423, in wrap_socket
    session=session
  File "/usr/local/lib/python3.7/ssl.py", line 870, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.7/ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1076)

My script:

ftp = FTP_TLS()
ftp.connect(host, port)
ftp.login(user, passwd)
ftp.prot_p()

Is there any way to turn off this warning or change some ciphers?

0 Answers0