2bi L S SK r S SKrS SKrSSKJr SSKJr Sr " S S5 rg) N )ProxySchemeUnsupported)sixi @ c \ rS rSrSr\S 5 r SS jrS rS r S r SS jrS S jrS!S jr S"S jrS"S jr S#S jrS rS rS$S jrS rS rS rS rS rS rS rS rS rS%S jrS rSrg)&SSLTransport a4 The SSLTransport wraps an existing socket and establishes an SSL connection. Contrary to Python's implementation of SSLSocket, it allows you to chain multiple TLS connections together. It's particularly useful if you need to implement TLS within TLS. The class supports most of the socket API operations. c | [ U S5 ( d+ [ R ( a [ S5 e[ S5 eg)z Raises a ProxySchemeUnsupported if the provided ssl_context can't be used for TLS in TLS. The only requirement is that the ssl_context provides the 'wrap_bio' methods. wrap_biozKTLS in TLS requires SSLContext.wrap_bio() which isn't supported on Python 2zXTLS in TLS requires SSLContext.wrap_bio() which isn't available on non-native SSLContextN)hasattrr PY2r )ssl_contexts ڗ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/urllib3/util/ssltransport.py$_validate_ssl_context_for_tls_in_tls1SSLTransport._validate_ssl_context_for_tls_in_tls sC {J//ww,, -9 0 Nc " [ R " 5 U l [ R " 5 U l X@l Xl UR U R U R US9U l U R U R R 5 g)zF Create an SSLTransport around socket using the provided ssl_context. )server_hostnameN) ssl MemoryBIOincomingoutgoingsuppress_ragged_eofssocketr sslobj_ssl_io_loopdo_handshake)selfr r r r s r __init__SSLTransport.__init__, si $8!!**MM4==/ + $++223r c U $ N r s r __enter__SSLTransport.__enter__? s r c $ U R 5 g r! )close)r _s r __exit__SSLTransport.__exit__B s r c 6 U R R 5 $ r! )r filenor# s r r, SSLTransport.filenoE {{!!##r c $ U R X5 $ r! )_wrap_ssl_read)r lenbuffers r readSSLTransport.readH s ""3//r c F US:w a [ S5 eU R U5 $ )Nr z+non-zero flags not allowed in calls to recv) ValueErrorr0 )r r1 flagss r recvSSLTransport.recvK s&