Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'argument': 0.04; 'subject:skip:c 10': 0.07; 'python': 0.09; 'library?': 0.09; 'self.sslobj': 0.16; 'sense,': 0.16; 'ssl_version': 0.16; 'martin': 0.16; '>>>': 0.18; 'import': 0.21; 'questions:': 0.22; 'to:2**1': 0.23; 'cheers': 0.24; 'feature': 0.24; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'thanks!': 0.26; 'correct': 0.28; 'lines': 0.28; 'quoting': 0.29; 'received:(horde framework)': 0.29; 'writes:': 0.29; 'url:python': 0.32; 'skip:s 30': 0.33; 'to:addr:python-list': 0.33; 'server': 0.35; 'there': 0.35; 'add': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'option': 0.37; 'two': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'content- disposition:inline': 0.60; 'more': 0.63 X-Envelope-From: debacle@debian.org Date: Tue, 26 Feb 2013 17:57:41 +0100 From: "W. Martin Borgert" To: "Antoine Pitrou" , python-list@python.org Subject: Re: IMAP4_SSL and OpenSSL compatibility References: <20130225224327.GA10266@fama.tangosoft.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.3.3 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361897864 news.xs4all.nl 6842 [2001:888:2000:d::a6]:54720 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39971 Quoting "Antoine Pitrou" : > W. Martin Borgert debian.org> writes: >> When I add an ssl_version argument to the call to >> ssl.wrap_socket() in imaplib.IMAP4_SSL.open(), I can connect to >> the Exchange server without problems: >> >> self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile, >> ssl_version = ssl.PROTOCOL_SSLv3) >> >> Would it make sense, to make this change in the Python standard >> library? > > There is already the ssl_context option for that: > http://docs.python.org/3.3/library/imaplib.html#imaplib.IMAP4_SSL Many thanks! Two more questions: 1. Is there any plan to backport this Python >= 3.3 feature to Python 2? 2. Would the following lines be correct for Python 3.3? >>> import imaplib >>> IMAP4_SSL("192.168.1.1.", ssl_context = SSLContext(ssl.PROTOCOL_SSLv3)) Cheers