Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69981
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python.list@tim.thechases.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; "'',": 0.07; 'subject:version': 0.09; 'def': 0.12; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'open()': 0.16; 'port))': 0.16; 'self.file': 0.16; 'self.port': 0.16; 'self.sock': 0.16; 'self.sslobj': 0.16; 'subject:SSL': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'host': 0.29; "i'm": 0.30; 'work:': 0.31; 'skip:s 30': 0.35; 'but': 0.35; 'method': 0.36; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'too': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'our': 0.64; 'received:50.22': 0.84; 'edwards': 0.91; 'dirty': 0.93 |
| Date | Wed, 9 Apr 2014 15:33:11 -0500 |
| From | Tim Chase <python.list@tim.thechases.com> |
| To | python-list@python.org |
| Subject | Re: imaplib: how to specify SSL/TLS protocol version? |
| In-Reply-To | <li4a1v$kdo$1@reader1.panix.com> |
| References | <li49ik$f94$1@reader1.panix.com> <li4a1v$kdo$1@reader1.panix.com> |
| X-Mailer | Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - boston.accountservergroup.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - tim.thechases.com |
| X-Get-Message-Sender-Via | boston.accountservergroup.com: authenticated_id: tim@thechases.com |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9095.1397075591.18130.python-list@python.org> (permalink) |
| Lines | 20 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1397075591 news.xs4all.nl 2838 [2001:888:2000:d::a6]:59987 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:69981 |
Show key headers only | View raw
On 2014-04-09 20:20, Grant Edwards wrote:
> I'm not too keen on this approach, but monkey-patching the open()
> method seems to work:
>
> def my_imap4_ssl_open(self, host = '', port = 993):
> self.host = host
> self.port = port
> self.sock = socket.create_connection((host, port))
> self.sslobj = ssl.wrap_socket(self.sock, self.keyfile,
> self.certfile, ssl_version=ssl.PROTOCOL_TLSv1) self.file =
> self.sslobj.makefile('rb')
>
> imaplib.IMAP4_SSL.open = my_imap4_ssl_open
Our messages passed in the ether. You don't have to feel dirty
for monkey-patching, as you can just do it with inheritance.
-tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 20:12 +0000
Re: imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 20:20 +0000
Re: imaplib: how to specify SSL/TLS protocol version? Tim Chase <python.list@tim.thechases.com> - 2014-04-09 15:33 -0500
Re: imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 20:55 +0000
Re: imaplib: how to specify SSL/TLS protocol version? Grant Edwards <invalid@invalid.invalid> - 2014-04-09 21:10 +0000
Re: imaplib: how to specify SSL/TLS protocol version? Chris Angelico <rosuav@gmail.com> - 2014-04-10 11:55 +1000
Re: imaplib: how to specify SSL/TLS protocol version? Tim Chase <python.list@tim.thechases.com> - 2014-04-09 15:26 -0500
Re: imaplib: how to specify SSL/TLS protocol version? Antoine Pitrou <solipsis@pitrou.net> - 2014-04-10 19:57 +0000
csiph-web