/usr/local/lib/python3.6/site-packages/urllib3/util/__pycache__
NameSizeModeActions
connection.cpython-36.pyc33650644editdlrm
proxy.cpython-36.pyc12730644editdlrm
queue.cpython-36.pyc9900644editdlrm
request.cpython-36.pyc34550644editdlrm
response.cpython-36.pyc22770644editdlrm
retry.cpython-36.pyc168620644editdlrm
ssltransport.cpython-36.pyc72570644editdlrm
ssl_.cpython-36.pyc115300644editdlrm
ssl_match_hostname.cpython-36.pyc31970644editdlrm
timeout.cpython-36.pyc90530644editdlrm
url.cpython-36.pyc106370644editdlrm
wait.cpython-36.pyc30980644editdlrm
__init__.cpython-36.pyc12250644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/urllib3/util/__pycache__/ssltransport.cpython-36.pyc (7257B)
3 Eg@sFddlZddlZddlZddlmZddlmZdZGdddZdS)N)ProxySchemeUnsupported)sixi@c@seZdZdZeddZd:ddZdd Zd d Zd d Z d;ddZ dddZ d?ddZd@ddZddZdd ZdAd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5ZdBd6d7Zd8d9ZdS)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|ds"tjrtdntddS)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)hasattrrPY2r) ssl_contextr C/usr/local/lib/python3.6/site-packages/urllib3/util/ssltransport.py$_validate_ssl_context_for_tls_in_tlss z1SSLTransport._validate_ssl_context_for_tls_in_tlsNTcCsHtj|_tj|_||_||_|j|j|j|d|_|j|jj dS)zV Create an SSLTransport around socket using the provided ssl_context. )server_hostnameN) ssl MemoryBIOincomingoutgoingsuppress_ragged_eofssocketrsslobj _ssl_io_loop do_handshake)selfrr r rr r r __init__,s  zSSLTransport.__init__cCs|S)Nr )rr r r __enter__?szSSLTransport.__enter__cGs |jdS)N)close)r_r r r __exit__BszSSLTransport.__exit__cCs |jjS)N)rfileno)rr r r rEszSSLTransport.filenocCs |j||S)N)_wrap_ssl_read)rlenbufferr r r readHszSSLTransport.readrcCs|dkrtd|j|S)Nrz+non-zero flags not allowed in calls to recv) ValueErrorr)rr flagsr r r recvKszSSLTransport.recvcCs>|dkrtd|r&|dkr&t|}n |dkr2d}|j||S)Nrz0non-zero flags not allowed in calls to recv_intoi)r#r r")rr!nbytesr$r r r recv_intoPs  zSSLTransport.recv_intocCsr|dkrtdd}t|L}|jd6}t|}x&||krX|j||d}||7}q4WWdQRXWdQRXdS)Nrz.non-zero flags not allowed in calls to sendallB)r# memoryviewcastr send)rdatar$countview byte_viewamountvr r r sendallYs zSSLTransport.sendallcCs$|dkrtd|j|jj|}|S)Nrz+non-zero flags not allowed in calls to send)r#rrwrite)rr,r$responser r r r+cszSSLTransport.sendrc Cst|dddhks td|fd|k}d|kp4| }|sB|sBtd|k}d} |rZ| d7} |rf| d7} tj|| } |jjd7_|dkrd }|dkrtj}|dkr|std | S|r|rtj| | |} n&|rtj | |} n|sttj | |} |r| Stj | |||} || _ | 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. r5wbz&invalid mode %r (only r, w, b allowed)Nrz!unbuffered streams must be binary) setr#AssertionErrorrSocketIO_io_refsioDEFAULT_BUFFER_SIZEBufferedRWPairBufferedReaderBufferedWriter TextIOWrappermode) rrE bufferingencodingerrorsnewlinewritingreadingbinaryrawmoderawr!textr r r makefileis@    zSSLTransport.makefilecCs|j|jjdS)N)rrunwrap)rr r r rQszSSLTransport.unwrapcCs|jjdS)N)rr)rr r r rszSSLTransport.closeFcCs |jj|S)N)r getpeercert)r binary_formr r r rRszSSLTransport.getpeercertcCs |jjS)N)rversion)rr r r rTszSSLTransport.versioncCs |jjS)N)rcipher)rr r r rUszSSLTransport.ciphercCs |jjS)N)rselected_alpn_protocol)rr r r rVsz#SSLTransport.selected_alpn_protocolcCs |jjS)N)rselected_npn_protocol)rr r r rWsz"SSLTransport.selected_npn_protocolcCs |jjS)N)rshared_ciphers)rr r r rXszSSLTransport.shared_cipherscCs |jjS)N)r compression)rr r r rYszSSLTransport.compressioncCs|jj|dS)N)r settimeout)rvaluer r r rZszSSLTransport.settimeoutcCs |jjS)N)r gettimeout)rr r r r\szSSLTransport.gettimeoutcCs|jjdS)N)r_decref_socketios)rr r r r]szSSLTransport._decref_socketioscCsTy|j|jj||Stjk rN}z|jtjkr<|jrPerforms an I/O loop between incoming/outgoing and the socket.TNF)rr^r_SSL_ERROR_WANT_READSSL_ERROR_WANT_WRITErr"rr2r% SSL_BLOCKSIZErr3 write_eof)rfuncargs should_loopretr_rabufr r r rs(     zSSLTransport._ssl_io_loop)NT)rN)rr)Nr)r)r)r5NNNN)F)N)__name__ __module__ __qualname____doc__ staticmethodr rrrrr"r%r'r2r+rPrQrrRrTrUrVrWrXrYrZr\r]rrr r r r r s4       ,  r) r?rr exceptionsrpackagesrrdrr r r r s