urllib3 icon indicating copy to clipboard operation
urllib3 copied to clipboard

SSL session reuse not supported

Open xnulinu opened this issue 9 years ago • 4 comments

Right now, SSL session reuse (partial handshake as client sends the SSL ID with the request) is not support by urllib3 library. This feature would significantly increase SSL performance by improving latency and computing time. The standard library does not support this feature as there seems to bug opened for this case http://bugs.python.org/issue8106 .

The new release version (0.14) of pyOpenSSL has opened number of callbacks from the subset of OpenSSL library. The particular API called 'set_session' or set_session_id (http://pythonhosted.org/pyOpenSSL/api/ssl.html#OpenSSL.SSL.Connection.set_session) can be use to enable SSL session reuse through Session Identifiers. To support this capability two task needs to be executed

  1. Store the initiated established session for particular host:port so that we can reuse the same session for the subsequent request.
  2. Use already created context associated for particular host:and port.

Any plans to integrate this feature in future release?.

Thanks

xnulinu avatar Apr 14 '15 19:04 xnulinu

There are currently no particular plans to implement this feature. That said, I can see some value in doing it, and it should be easy enough to do, so I'd be :+1: on adding support. That said, I'd rather the stdlib supported this function as well.

Lukasa avatar Apr 14 '15 19:04 Lukasa

Agreed. Nobody is working on this yet, but we'd appreciate help/contributions and will be happy to help along as needed. :)

shazow avatar Apr 14 '15 19:04 shazow

@shazow @Lukasa

Thank you guys for prompt response. I have started looking to fix the issue.

xnulinu avatar Apr 22 '15 20:04 xnulinu

pyOpenSSL is deprecated and will be removed in future release version 2.x (https://github.com/urllib3/urllib3/issues/2691).

IvanLauLinTiong avatar Aug 11 '22 15:08 IvanLauLinTiong