New submission from Geert Jansen:

The attached patch adds a _MemoryBIO type to _ssl, and a _wrap_bio() method to 
_SSLContext. The patch also includes tests.

For now I kept _wrap_bio() and _MemoryBIO semi-private. The reason is that it 
returns an _SSLSocket instead of an SSLSocket and this type has not been 
exposed before as part of the public API. Changing the result of _wrap_bio to 
return an SSLSocket is not appropriate IMHO because it should not inherit from 
socket.socket which would waste a file descriptor and None of the IO methods 
are relevant.

The patch works for me and gives no errors with --with-pydebug. I've also used 
it in an experimental branch of Gruvi and all the tests pass there too.

----------
files: ssl-memory-bio.patch
keywords: patch
messages: 222833
nosy: geertj
priority: normal
severity: normal
status: open
title: Add support for Memory BIO to _ssl
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35928/ssl-memory-bio.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21965>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to