smtplib is broken when using TLS

Giampaolo Rodolà g.rodola at gmail.com
Thu May 19 05:28:48 EDT 2011


Please file a ticket on:
http://bugs.python.org/

Regards,

--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/

2011/5/17 nirinA raseliarison <nirina.raseliarison at gmail.com>:
> i think this has the same origin as the ftplib test failure.
>
> Python 3.2.1rc1 (default, May 17 2011, 22:01:34)
> [GCC 4.6.0] on linux2
> Type "copyright", "credits" or "license()" for more information.
>>>>
>>>> ================================ RESTART
>>>> ================================
>>>>
>
> send: 'ehlo [127.0.0.1]\r\n'
> reply: b'250-mx.google.com at your service, [41.188.13.184]\r\n'
> reply: b'250-SIZE 35882577\r\n'
> reply: b'250-8BITMIME\r\n'
> reply: b'250-STARTTLS\r\n'
> reply: b'250 ENHANCEDSTATUSCODES\r\n'
> reply: retcode (250); Msg: b'mx.google.com at your service,
> [41.188.13.184]\nSIZE 35882577\n8BITMIME\nSTARTTLS\nENHANCEDSTATUSCODES'
> send: 'STARTTLS\r\n'
> reply: b'220 2.0.0 Ready to start TLS\r\n'
> reply: retcode (220); Msg: b'2.0.0 Ready to start TLS'
> Traceback (most recent call last):
>    File "/root/template_mail_text.py", line 49, in <module>
>      server.starttls()
>    File "/usr/local/lib/python3.2/smtplib.py", line 649, in starttls
>      self.sock = ssl.wrap_socket(self.sock, keyfile, certfile)
>    File "/usr/local/lib/python3.2/ssl.py", line 509, in wrap_socket
>      ciphers=ciphers)
>    File "/usr/local/lib/python3.2/ssl.py", line 266, in __init__
>      raise x
>    File "/usr/local/lib/python3.2/ssl.py", line 262, in __init__
>      self.do_handshake()
>    File "/usr/local/lib/python3.2/ssl.py", line 441, in do_handshake
>      self._sslobj.do_handshake()
> ssl.SSLError: [Errno 1] _ssl.c:392: error:140943FC:SSL
> routines:SSL3_READ_BYTES:sslv3 alert bad record mac
>
>
> --
> nirinA
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list