Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in

#19500: Error when connecting to FTPS servers not supporting SSL session resuming

Can't Edit
Can't Publish+Mail
Start Review
4 years, 1 month ago by devyew
3 years, 2 months ago
victor.stinner, lists
bill.janssen_gmail.com, AntoinePitrou, giampaolo.rodola, christian.heimes, alex, devnull_psf.upfronthosting.co.za, dstufft, devyew_gmail.com, parallaxtz_gmail.com, xiang.zhang, stephenash_gmail.com, rob_reilink.net

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Total comments: 7

Patch Set 6 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/ssl.rst View 1 2 3 4 5 6 chunks +49 lines, -4 lines 0 comments Download
Lib/ssl.py View 1 2 3 4 5 9 chunks +53 lines, -12 lines 0 comments Download
Lib/test/test_ssl.py View 1 2 3 4 5 4 chunks +110 lines, -2 lines 0 comments Download


Total messages: 2
http://bugs.python.org/review/19500/diff/18341/Doc/library/ssl.rst File Doc/library/ssl.rst (right): http://bugs.python.org/review/19500/diff/18341/Doc/library/ssl.rst#newcode1088 Doc/library/ssl.rst:1088: .. attribute:: SSLSocket.session_reused Need a description. Example: True if ...
3 years, 2 months ago #1
3 years, 2 months ago #2
File Doc/library/ssl.rst (right):

Doc/library/ssl.rst:1088: .. attribute:: SSLSocket.session_reused
On 2016/09/05 23:58:08, haypo wrote:
> Need a description. Example:
> True if the session comes a previous connection.
> (I don't understand well the reused flag.)

The patch isn't completed. I'm working on code first and do the documentation
later, maybe between b1 and b2. Ned is with it.

For this function, see http://linux.die.net/man/3/ssl_session_reused

File Lib/ssl.py (right):

Lib/ssl.py:690: _context=None, _session=None):
On 2016/09/05 23:58:08, haypo wrote:
> The setter is public but the constructor parameter is private? Why not marking
> it public? Moreover, the parameter is public in wrap_socket().

It's the same as _context. You are not suppose to pass this argument along
manually. Use the API. (Yes, it's ugly)

> By the way, it's maybe time to start to use keyword-only argument when adding
> new parameters :-)

Good point!

Lib/ssl.py:791: """The SSLSession for client socket."""
On 2016/09/05 23:58:08, haypo wrote:
> Why not using self._session here?

because I'm not interested in the cached session (which is usually None or the
previous session) but in the actual session after do_handshake(). I only keep
_session here so I can pass it to _SSLSocket in _real_connect().

After do_handshake() self._sslobj._sslobj.session refers to a different session
than self._session. The most recent session from the peer is
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+