/usr/lib/python3.9/site-packages/urllib3/util/__pycache__
NameSizeModeActions
connection.cpython-39.opt-1.pyc34010644editdlrm
connection.cpython-39.pyc34010644editdlrm
proxy.cpython-39.opt-1.pyc12970644editdlrm
proxy.cpython-39.pyc12970644editdlrm
queue.cpython-39.opt-1.pyc10160644editdlrm
queue.cpython-39.pyc10160644editdlrm
request.cpython-39.opt-1.pyc34040644editdlrm
request.cpython-39.pyc34040644editdlrm
response.cpython-39.opt-1.pyc23010644editdlrm
response.cpython-39.pyc23010644editdlrm
retry.cpython-39.opt-1.pyc159500644editdlrm
retry.cpython-39.pyc159500644editdlrm
ssltransport.cpython-39.opt-1.pyc74180644editdlrm
ssltransport.cpython-39.pyc74420644editdlrm
ssl_.cpython-39.opt-1.pyc112730644editdlrm
ssl_.cpython-39.pyc112730644editdlrm
timeout.cpython-39.opt-1.pyc88990644editdlrm
timeout.cpython-39.pyc88990644editdlrm
url.cpython-39.opt-1.pyc106000644editdlrm
url.cpython-39.pyc106000644editdlrm
wait.cpython-39.opt-1.pyc30840644editdlrm
wait.cpython-39.pyc30840644editdlrm
__init__.cpython-39.opt-1.pyc10610644editdlrm
__init__.cpython-39.pyc10610644editdlrm
Edit: /usr/lib/python3.9/site-packages/urllib3/util/__pycache__/ssltransport.cpython-39.pyc (7442B)
a t~®`ûã@sFddlZddlZddlZddlmZddlmZdZGdd„dƒZdS)éN)ÚProxySchemeUnsupported)Úsixi@c@sîeZdZdZedd„ƒZd:dd„Zdd „Zd d „Zd d „Z d;dd„Z ddd„Z d?dd„Zd@dd„Zdd„Zdd „ZdAd"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zd0d1„Zd2d3„Zd4d5„ZdBd6d7„Zd8d9„ZdS)CÚ SSLTransportaL 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. cCs&t|dƒs"tjrtdƒ‚ntdƒ‚dS)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)ÚhasattrrZPY2r)Ú ssl_context©rú=/usr/lib/python3.9/site-packages/urllib3/util/ssltransport.pyÚ$_validate_ssl_context_for_tls_in_tlss ÿÿz1SSLTransport._validate_ssl_context_for_tls_in_tlsNTcCsHt ¡|_t ¡|_||_||_|j|j|j|d�|_| |jj ¡dS)zV Create an SSLTransport around socket using the provided ssl_context. )Úserver_hostnameN) ÚsslZ MemoryBIOÚincomingÚoutgoingÚsuppress_ragged_eofsÚsocketrÚsslobjÚ _ssl_io_loopZ do_handshake)Úselfrrr rrrr Ú__init__,s   ÿzSSLTransport.__init__cCs|S©Nr©rrrr Ú __enter__?szSSLTransport.__enter__cGs | ¡dSr)Úclose)rÚ_rrr Ú__exit__BszSSLTransport.__exit__cCs |j ¡Sr)rÚfilenorrrr rEszSSLTransport.filenoécCs | ||¡Sr)Ú_wrap_ssl_read)rÚlenÚbufferrrr ÚreadHszSSLTransport.readrcCs|dkrtdƒ‚| |¡S)Nrz+non-zero flags not allowed in calls to recv)Ú ValueErrorr)rrÚflagsrrr ÚrecvKszSSLTransport.recvcCs>|dkrtdƒ‚|r&|dur&t|ƒ}n |dur2d}| ||¡S)Nrz0non-zero flags not allowed in calls to recv_intor)r!rr )rrÚnbytesr"rrr Ú recv_intoPs  zSSLTransport.recv_intoc Cs–|dkrtdƒ‚d}t|ƒ�f}| d¡�<}t|ƒ}||krV| ||d…¡}||7}q2Wdƒn1sj0YWdƒn1sˆ0YdS)Nrz.non-zero flags not allowed in calls to sendallÚB)r!Ú memoryviewÚcastrÚsend)rÚdatar"ÚcountÚviewÚ byte_viewÚamountÚvrrr ÚsendallYszSSLTransport.sendallcCs$|dkrtdƒ‚| |jj|¡}|S)Nrz+non-zero flags not allowed in calls to send)r!rrÚwrite)rr*r"Zresponserrr r)cszSSLTransport.sendÚrc Cst|ƒhd£kstd|fƒ‚d|v}d|vp2| }|s@|s@J‚d|v}d} |rX| d7} |rd| d7} t || ¡} |jjd7_|durŒd }|d krštj}|d kr²|s®td ƒ‚| S|rÊ|rÊt | | |¡} n&|rÜt | |¡} n|säJ‚t  | |¡} |rø| St  | |||¡} || _ | S) a Python's httpclient uses makefile and buffered io when reading HTTP messages and we need to support it. This is unfortunately a copy and paste of socket.py makefile with small changes to point to the socket directly. >r2ÚbÚwz&invalid mode %r (only r, w, b allowed)r4r2r3ÚéNéÿÿÿÿrz!unbuffered streams must be binary) Úsetr!rZSocketIOZ_io_refsÚioÚDEFAULT_BUFFER_SIZEÚBufferedRWPairÚBufferedReaderÚBufferedWriterÚ TextIOWrapperÚmode) rr?Ú bufferingÚencodingÚerrorsÚnewlineZwritingZreadingZbinaryZrawmodeÚrawrÚtextrrr Úmakefileis@    zSSLTransport.makefilecCs| |jj¡dSr)rrÚunwraprrrr rG–szSSLTransport.unwrapcCs|j ¡dSr)rrrrrr r™szSSLTransport.closeFcCs |j |¡Sr)rÚ getpeercert)rZ binary_formrrr rHœszSSLTransport.getpeercertcCs |j ¡Sr)rÚversionrrrr rIŸszSSLTransport.versioncCs |j ¡Sr)rÚcipherrrrr rJ¢szSSLTransport.ciphercCs |j ¡Sr)rÚselected_alpn_protocolrrrr rK¥sz#SSLTransport.selected_alpn_protocolcCs |j ¡Sr)rÚselected_npn_protocolrrrr rL¨sz"SSLTransport.selected_npn_protocolcCs |j ¡Sr)rÚshared_ciphersrrrr rM«szSSLTransport.shared_cipherscCs |j ¡Sr)rÚ compressionrrrr rN®szSSLTransport.compressioncCs|j |¡dSr)rÚ settimeout)rÚvaluerrr rO±szSSLTransport.settimeoutcCs |j ¡Sr)rÚ gettimeoutrrrr rQ´szSSLTransport.gettimeoutcCs|j ¡dSr)rÚ_decref_socketiosrrrr rR·szSSLTransport._decref_socketiosc Csbz| |jj||¡WStjy\}z.|jtjkrF|jrFWYd}~dS‚WYd}~n d}~00dS)Nr)rrr r ÚSSLErrorÚerrnoZ SSL_ERROR_EOFr)rrrÚerrr rºs zSSLTransport._wrap_ssl_readc Gs¼d}d}|r¸d}z ||Ž}WnBtjy^}z(|jtjtjfvrD|‚|j}WYd}~n d}~00|j ¡}|j |¡|dur„d}q|tjkr|j  t ¡}|r¬|j   |¡q|j   ¡q|S)z>Performs an I/O loop between incoming/outgoing and the socket.TNF)r rSrTZSSL_ERROR_WANT_READZSSL_ERROR_WANT_WRITErr rr0r#Ú SSL_BLOCKSIZEr r1Z write_eof)rÚfuncÚargsZ should_loopÚretrTrUÚbufrrr rÃs(      zSSLTransport._ssl_io_loop)NT)rN)rr)Nr)r)r)r2NNNN)F)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú staticmethodr rrrrr r#r%r0r)rFrGrrHrIrJrKrLrMrNrOrQrRrrrrrr r s:  ÿ    ÿ -  r) r9rr Zurllib3.exceptionsrZurllib3.packagesrrVrrrrr Ús