Uh oh!
There was an error while loading. Please reload this page.
[Feature #19641] Enable to pass SSLContext to Net::HTTP - #147
Conversation
Also SSLContext is reused among requests. Co-authored-by: Seonggi Yang <seonggi.yang@gmail.com>
rhenium
commented
Aug 20, 2023
Reusing SSLContext might be a breaking change. A Net::HTTP instance may start a connection multiple times, but an SSLContext can only be modified before the first connection due to http=Net::HTTP.new(host)http.cert=cert_ahttp.key=key_ahttp.start{http.get("/")}http.cert=cert_bhttp.key=key_bhttp.start{http.get("/")}This concern led to the hack-ish code for TLS session resumption we currently have in #connect. Please see https://bugs.ruby-lang.org/issues/5341 for context. |
rhenium
commented
Aug 20, 2023
https://bugs.ruby-lang.org/issues/19641
For the same reason as above, the new attribute for setting SSLContext has to assume the user-supplied SSLContext may already be frozen. So I think we have no choice but to disallow other existing attributes for configuring SSLContext if user supplies a pre-made SSLContext. |
shouichi
commented
Aug 25, 2023
@rhenium Thank you for the explanation. How about letting users set arbitrary parameters to SSLContext? |
Also SSLContext is reused among requests.