imaplib: how to specify SSL/TLS protocol version?

Antoine Pitrou solipsis at pitrou.net
Thu Apr 10 15:57:57 EDT 2014


Grant Edwards <invalid <at> invalid.invalid> writes:
> 
> Experiments show that when calling ssl.wrap_socket() I have to specify
> ssl_version=PROTOCOL_TLSv1 to avoid the above error.
> 
> How do I tell imaplib to use TLS1 instead of SSL3?

Use Python 3 and pass the ssl_context parameter to IMAP_SSL:
https://docs.python.org/3.3/library/imaplib.html#imaplib.IMAP4_SSL

Regards

Antoine.





More information about the Python-list mailing list