Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/asyncio/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/asyncio/__pycache__/sslproto.cpython-311.opt-2.pyc
�

�,d�z��P�ddlZddlZddlZ	ddlZn
#e$rdZYnwxYwddlmZddlmZddlmZddlm	Z	ddl
mZe�ejej
fZGd�d	ej��ZGd
�dej��Zd�Zd
�ZGd�de	je	j��ZGd�dej��ZdS)�N�)�	constants)�
exceptions)�	protocols)�
transports)�loggerc�"�eZdZdZdZdZdZdZdS)�SSLProtocolState�	UNWRAPPED�DO_HANDSHAKE�WRAPPED�FLUSHING�SHUTDOWNN)�__name__�
__module__�__qualname__rrr
rr���7/opt/alt/python311/lib64/python3.11/asyncio/sslproto.pyr
r
s'�������I�!�L��G��H��H�H�Hrr
c��eZdZdZdZdZdZdS)�AppProtocolState�
STATE_INIT�STATE_CON_MADE�	STATE_EOF�STATE_CON_LOSTN)rrrrrrrrrrrrs$�������J�%�N��I�%�N�N�Nrrc�`�|rtd���tj��}|sd|_|S)Nz(Server side SSL needs a valid SSLContextF)�
ValueError�ssl�create_default_context�check_hostname)�server_side�server_hostname�
sslcontexts   r�_create_transport_contextr$+s@���E��C�D�D�D��+�-�-�J��*�$)�
�!��rc��|�|�|dz}n
|}d|z}n|}|�|dz}n|}||cxkrdksntd|�d|�d����||fS)Ni�rzhigh (z) must be >= low (z) must be >= 0)r)�high�low�kb�hi�los     r�add_flowcontrol_defaultsr,9s����|��;��d��B�B��B��R��B�B�
��
�{�
�1�W���
��
��=�=�=�=�q�=�=�=�=��j��"�"�b�b�b�"�#�#�	#��r�6�Mrc���eZdZdZejjZd�Zdd�Z	d�Z
d�Zd�Zd�Z
efd	�Zd
�Zd�Zd�Zdd
�Zd�Zd�Zdd�Zd�Zd�Zed���Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!dS)�_SSLProtocolTransportTc�0�||_||_d|_dS�NF)�_loop�
_ssl_protocol�_closed)�self�loop�ssl_protocols   r�__init__z_SSLProtocolTransport.__init__Ts����
�)�������rNc�:�	|j�||��S�N)r2�_get_extra_info�r4�name�defaults   r�get_extra_infoz$_SSLProtocolTransport.get_extra_infoYs��1��!�1�1�$��@�@�@rc�:�|j�|��dSr9)r2�_set_app_protocol)r4�protocols  r�set_protocolz"_SSLProtocolTransport.set_protocol]s����,�,�X�6�6�6�6�6rc��|jjSr9)r2�
_app_protocol�r4s r�get_protocolz"_SSLProtocolTransport.get_protocol`s���!�/�/rc��|jSr9)r3rEs r�
is_closingz _SSLProtocolTransport.is_closingcs
���|�rc�h�	|js"d|_|j���dSd|_dS�NT)r3r2�_start_shutdownrEs r�closez_SSLProtocolTransport.closefsC��	��|�	&��D�L���.�.�0�0�0�0�0�!%�D���rc�\�|js$d|_|�dt��dSdS)NTz9unclosed transport <asyncio._SSLProtocolTransport object>)r3�warn�ResourceWarning)r4�	_warningss  r�__del__z_SSLProtocolTransport.__del__tsE���|�	,��D�L��N�N��*�
,�
,�
,�
,�
,�	,�	,rc��|jjSr9)r2�_app_reading_pausedrEs r�
is_readingz _SSLProtocolTransport.is_reading{s���%�9�9�9rc�:�	|j���dSr9)r2�_pause_readingrEs r�
pause_readingz#_SSLProtocolTransport.pause_reading~s$��	�
	
��)�)�+�+�+�+�+rc�:�	|j���dSr9)r2�_resume_readingrEs r�resume_readingz$_SSLProtocolTransport.resume_reading�s$��	�
	
��*�*�,�,�,�,�,rc�p�	|j�||��|j���dSr9)r2�_set_write_buffer_limits�_control_app_writing�r4r'r(s   r�set_write_buffer_limitsz-_SSLProtocolTransport.set_write_buffer_limits�s=��	�$	
��3�3�D�#�>�>�>���/�/�1�1�1�1�1rc�2�|jj|jjfSr9)r2�_outgoing_low_water�_outgoing_high_waterrEs r�get_write_buffer_limitsz-_SSLProtocolTransport.get_write_buffer_limits�����"�6��"�7�9�	9rc�6�	|j���Sr9)r2�_get_write_buffer_sizerEs r�get_write_buffer_sizez+_SSLProtocolTransport.get_write_buffer_size�s��;��!�8�8�:�:�:rc�p�	|j�||��|j���dSr9)r2�_set_read_buffer_limits�_control_ssl_readingr^s   r�set_read_buffer_limitsz,_SSLProtocolTransport.set_read_buffer_limits�s=��	�$	
��2�2�4��=�=�=���/�/�1�1�1�1�1rc�2�|jj|jjfSr9)r2�_incoming_low_water�_incoming_high_waterrEs r�get_read_buffer_limitsz,_SSLProtocolTransport.get_read_buffer_limits�rdrc�6�	|j���Sr9)r2�_get_read_buffer_sizerEs r�get_read_buffer_sizez*_SSLProtocolTransport.get_read_buffer_size�s��9��!�7�7�9�9�9rc��|jjSr9)r2�_app_writing_pausedrEs r�_protocol_pausedz&_SSLProtocolTransport._protocol_paused�s���!�5�5rc���	t|tttf��s$t	dt|��j�����|sdS|j�|f��dS)Nz+data: expecting a bytes-like instance, got )	�
isinstance�bytes�	bytearray�
memoryview�	TypeError�typerr2�_write_appdata�r4�datas  r�writez_SSLProtocolTransport.write�s{��	�
�$��	�:� >�?�?�	:��9�#'��:�:�#6�9�9�:�:�
:��	��F���)�)�4�'�2�2�2�2�2rc�<�	|j�|��dSr9)r2r})r4�list_of_datas  r�
writelinesz _SSLProtocolTransport.writelines�s&��	�
	
��)�)�,�7�7�7�7�7rc��	t�r9)�NotImplementedErrorrEs r�	write_eofz_SSLProtocolTransport.write_eof�s��	�"�!rc��	dSr0rrEs r�
can_write_eofz#_SSLProtocolTransport.can_write_eof�s
��O��urc�H�	d|_|j���dSrJ�r3r2�_abortrEs r�abortz_SSLProtocolTransport.abort�s+��	������!�!�#�#�#�#�#rc�H�d|_|j�|��dSrJr��r4�excs  r�_force_closez"_SSLProtocolTransport._force_close�s&�������!�!�#�&�&�&�&�&rc��|jj�|��|jxjt	|��z
c_dSr9)r2�_write_backlog�append�_write_buffer_size�lenr~s  r�_test__append_write_backlogz1_SSLProtocolTransport._test__append_write_backlog�s?����)�0�0��6�6�6���-�-��T���:�-�-�-�-rr9�NN)"rrr�_start_tls_compatibler�
_SendfileMode�FALLBACK�_sendfile_compatibler7r>rBrFrHrL�warningsrQrTrWrZr_rcrgrkrorr�propertyrur�r�r�r�r�r�r�rrrr.r.Ns�������!��$�2�;�����
A�A�A�A�7�7�7�0�0�0����&�&�&�!)�,�,�,�,�:�:�:�,�,�,�-�-�-�2�2�2�2�,9�9�9�;�;�;�2�2�2�2�,9�9�9�:�:�:��6�6��X�6�3�3�3�8�8�8�"�"�"����$�$�$�'�'�'�;�;�;�;�;rr.c��eZdZdZdZdZdZ				d-d�Zd�Zd.d�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd.d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d/d#�Z%d$�Z&d%�Z'd&�Z(d/d'�Z)d(�Z*d)�Z+d*�Z,d0d,�Z-dS)1�SSLProtocoliNFTc
���t�td���t|j��|_t|j��|_|�
tj}n|dkrtd|�����|	�
tj
}	n|	dkrtd|	�����|st||��}||_|r
|s||_
nd|_
||_t|���|_t#j��|_d|_||_||_|�|��d|_d|_d|_||_|	|_tj��|_tj��|_t@j!|_"d|_#|rtHj%|_&ntHj'|_&|j�(|j|j|j|j
���|_)d|_*d|_+d|_,d|_-d|_.|�/��d|_0d|_1d|_2d|_3|�4��|�5��dS)Nzstdlib ssl module not availablerz7ssl_handshake_timeout should be a positive number, got z6ssl_shutdown_timeout should be a positive number, got )r#F)r!r")6r�RuntimeErrorry�max_size�_ssl_bufferrz�_ssl_buffer_viewr�SSL_HANDSHAKE_TIMEOUTr�SSL_SHUTDOWN_TIMEOUTr$�_server_side�_server_hostname�_sslcontext�dict�_extra�collections�dequer�r��_waiterr1r@�_app_transport�_app_transport_created�
_transport�_ssl_handshake_timeout�_ssl_shutdown_timeout�	MemoryBIO�	_incoming�	_outgoingr
r�_state�
_conn_lostrr�
_app_stater�wrap_bio�_sslobj�_ssl_writing_pausedrS�_ssl_reading_pausedrnrmri�
_eof_receivedrtrbrar\�_get_app_transport)
r4r5�app_protocolr#�waiterr!r"�call_connection_made�ssl_handshake_timeout�ssl_shutdown_timeouts
          rr7zSSLProtocol.__init__
s���
�;��@�A�A�A�$�T�]�3�3��� *�4�+;� <� <��� �(�$-�$C�!�!�
"�a�
'�
'��/�,�/�/�0�0�
0� �'�#,�#A� � �
!�Q�
&�
&��.�+�.�.�/�/�
/��	.�2��_�.�.�J�(����	)�;�	)�$3�D�!�!�$(�D�!�%����j�1�1�1���*�/�1�1���"#��������
����|�,�,�,�"���&+��#����&;��#�%9��"�������������&�0�������	>�.�9�D�O�O�.�=�D�O��'�0�0��N�D�N��)� �1�1�3�3���$)�� �#(�� �#(�� �$%��!�#$�� ��$�$�&�&�&�"���#(�� �$%��!�#$�� ��%�%�'�'�'����!�!�!�!�!rc��||_t|d��r;t|tj��r!|j|_|j|_d|_	dSd|_	dS)N�
get_bufferTF)
rD�hasattrrwr�BufferedProtocolr��_app_protocol_get_buffer�buffer_updated�_app_protocol_buffer_updated�_app_protocol_is_buffer)r4r�s  rr@zSSLProtocol._set_app_protocol]sc��)����L�,�/�/�	1��<��)C�D�D�	1�,8�,C�D�)�0<�0K�D�-�+/�D�(�(�(�+0�D�(�(�(rc���|j�dS|j���s7|�|j�|��n|j�d��d|_dSr9)r��	cancelled�
set_exception�
set_resultr�s  r�_wakeup_waiterzSSLProtocol._wakeup_waiterhsd���<���F��|�%�%�'�'�	.�����*�*�3�/�/�/�/���'�'��-�-�-�����rc��|j�7|jrtd���t|j|��|_d|_|jS)Nz$Creating _SSLProtocolTransport twiceT)r�r�r�r.r1rEs rr�zSSLProtocol._get_app_transportrsK����&��*�
K�"�#I�J�J�J�"7��
�D�"I�"I�D��*.�D�'��"�"rc�>�	||_|���dSr9)r��_start_handshake)r4�	transports  r�connection_madezSSLProtocol.connection_madezs(��	�$����������rc���	|j���|j���|xjdz
c_|j�d|j_|jtj	kr`|j
tjks|j
tj
kr6tj|_
|j�|jj|��|�tj��d|_d|_d|_|�|��|jr |j���d|_|jr"|j���d|_dSdS)NrT)r��clearr��readr�r�r3r�r
rr�rrrrr1�	call_soonrD�connection_lost�
_set_staterr�r��_shutdown_timeout_handle�cancel�_handshake_timeout_handler�s  rr�zSSLProtocol.connection_lost�sT��	�	
��!�!�#�#�#�����������1������*�*.�D��'��;�*�7�7�7���#3�#B�B�B���#3�#=�=�=�"2�"A����
�$�$�T�%7�%G��M�M�M����(�2�3�3�3����"���!������C� � � ��(�	1��)�0�0�2�2�2�,0�D�)��)�	2��*�1�1�3�3�3�-1�D�*�*�*�	2�	2rc���|}|dks||jkr|j}t|j��|kr-t|��|_t	|j��|_|jS�Nr)r�r�r�ryrzr�)r4�n�wants   rr�zSSLProtocol.get_buffer�sc�����1�9�9��t�}�,�,��=�D��t�� � �4�'�'�(����D��$.�t�/?�$@�$@�D�!��$�$rc��|j�|jd|���|jtjkr|���dS|jtjkr|���dS|jtj	kr|�
��dS|jtjkr|���dSdSr9)
r�r�r�r�r
r�
_do_handshaker
�_do_readr�	_do_flushr�_do_shutdown)r4�nbytess  rr�zSSLProtocol.buffer_updated�s�������T�2�7�F�7�;�<�<�<��;�*�7�7�7���� � � � � �
�[�,�4�
4�
4��M�M�O�O�O�O�O�
�[�,�5�
5�
5��N�N������
�[�,�5�
5�
5���������6�
5rc���	d|_	|j���rtjd|��|jtjkr|�t��dS|jtj
kr>|�tj��|j
rdS|���dS|jtjkrI|���|�tj��|���dS|jtjkr|���dSdS#t$$r|j����wxYw)NTz%r received EOF)r�r1�	get_debugr�debugr�r
r�_on_handshake_complete�ConnectionResetErrorr
r�rrSr��	_do_writerr��	Exceptionr�rLrEs r�eof_receivedzSSLProtocol.eof_received�sl��	�"���	��z�#�#�%�%�
6���.��5�5�5��{�.�;�;�;��+�+�,@�A�A�A�A�A��� 0� 8�8�8���� 0� 9�:�:�:��+�%��4��N�N�$�$�$�$�$��� 0� 9�9�9���� � � ���� 0� 9�:�:�:��!�!�#�#�#�#�#��� 0� 9�9�9��!�!�#�#�#�#�#�:�9���	�	�	��O�!�!�#�#�#��	���s%�AE�);E�&E�<AE�)E�%E,c�v�||jvr
|j|S|j�|j�||��S|Sr9)r�r�r>r;s   rr:zSSLProtocol._get_extra_info�sA���4�;����;�t�$�$�
�_�
(��?�1�1�$��@�@�@��Nrc���d}|tjkrd}n�|jtjkr|tjkrd}nw|jtjkr|tjkrd}nO|jtjkr|tjkrd}n'|jtjkr|tjkrd}|r	||_dStd�|j|�����)NFTz!cannot switch state from {} to {})	r
rr�rr
rrr��format)r4�	new_state�alloweds   rr�zSSLProtocol._set_state�s�����(�2�2�2��G�G�
�K�+�5�5�5��)�6�6�6��G�G�
�K�+�8�8�8��)�1�1�1��G�G�
�K�+�3�3�3��)�2�2�2��G�G�
�K�+�4�4�4��)�2�2�2��G��	-�#�D�K�K�K��3�:�:��K��,�,�-�-�
-rc�f���j���r4tjd����j����_nd�_��tj���j�	�j
�fd����_����dS)Nz%r starts SSL handshakec�,������Sr9)�_check_handshake_timeoutrEs�r�<lambda>z.SSLProtocol._start_handshake.<locals>.<lambda>s���$�*G�*G�*I�*I�r)
r1r�rr��time�_handshake_start_timer�r
r�
call_laterr�r�r�rEs`rr�zSSLProtocol._start_handshakes�����:���!�!�	.��L�2�D�9�9�9�)-����):�):�D�&�&�)-�D�&����(�5�6�6�6�
�J�!�!�$�"=�"I�"I�"I�"I�
K�
K�	
�&�	
�������rc��|jtjkr/d|j�d�}|�t|����dSdS)Nz$SSL handshake is taking longer than z! seconds: aborting the connection)r�r
rr��_fatal_error�ConnectionAbortedError)r4�msgs  rr�z$SSLProtocol._check_handshake_timeout!s_���;�*�7�7�7�+��.�+�+�+�
�

���4�S�9�9�:�:�:�:�:�
8�7rc��	|j���|�d��dS#t$r|���YdSt
j$r }|�|��Yd}~dSd}~wwxYwr9)r��do_handshaker��SSLAgainErrors�_process_outgoingr�SSLErrorr�s  rr�zSSLProtocol._do_handshake*s���	.��L�%�%�'�'�'�
�'�'��-�-�-�-�-���	%�	%�	%��"�"�$�$�$�$�$�$��|�	-�	-�	-��'�'��,�,�,�,�,�,�,�,�,�����	-���s�2�B�B�!A<�<Bc��|j� |j���d|_|j}	|� |�tj��n|�|���}n�#t$rt}|�tj��t|tj��rd}nd}|�||��|�
|��Yd}~dSd}~wwxYw|j���r:|j���|jz
}t%jd||dz��|j�||���|���|���|jt2jkr=t2j|_|j�|�����|�
��|���dS)Nz1SSL handshake failed on verifying the certificatezSSL handshake failedz%r: SSL handshake took %.1f msg@�@)�peercert�cipher�compression�
ssl_object) r�r�r�r�r
r
�getpeercertr�rrwr�CertificateErrorr�r�r1r�r�r�rr�r��updater	r
r�rrrrDr�r�r�)r4�
handshake_exc�sslobjrr�r�dts       rr�z"SSLProtocol._on_handshake_complete4s����)�5��*�1�1�3�3�3�-1�D�*����	��$���� 0� 8�9�9�9�9�#�#��)�)�+�+�H�H���	�	�	��O�O�,�6�7�7�7��#�s�3�4�4�
-�I���,�����c�3�'�'�'�����$�$�$��F�F�F�F�F�����	�����:���!�!�	K�����"�"�T�%?�?�B��L�9�4��c��J�J�J�	
����H�"(�-�-�/�/�'-�'9�'9�';�';�&,�	�	.�	.�	.��?�.�9�9�9�.�=�D�O���.�.�t�/F�/F�/H�/H�I�I�I��������
�
�����s�8A)�)
C'�3A)C"�"C'c����jtjtjtjfvrdS�j�d�j_�jtjkr����dS��	tj���j
��j�fd����_
����dS)NTc�,������Sr9)�_check_shutdown_timeoutrEs�rr�z-SSLProtocol._start_shutdown.<locals>.<lambda>ms����4�4�6�6�r)r�r
rrrr�r3rr�r�r1r�r�r�r�rEs`rrKzSSLProtocol._start_shutdown\s�����K� �)� �)� �*��
�
�
�F���*�*.�D��'��;�*�7�7�7��K�K�M�M�M�M�M��O�O�,�5�6�6�6�,0�J�,A�,A��*�6�6�6�6�-�-�D�)�
�N�N�����rc��|jtjtjfvr.|j�t
jd����dSdS)NzSSL shutdown timed out)r�r
rrr�r�r�TimeoutErrorrEs rrz#SSLProtocol._check_shutdown_timeoutqsf���K� �)� �)��
�
�

�O�(�(��'�(@�A�A�
C�
C�
C�
C�
C�
�
rc��|���|�tj��|���dSr9)r�r�r
rr�rEs rr�zSSLProtocol._do_flush{s=���
�
�������(�1�2�2�2��������rc�f�	|js|j���|���|���|�d��dS#t$r|���YdStj$r }|�|��Yd}~dSd}~wwxYwr9)	r�r��unwrapr�_call_eof_received�_on_shutdown_completerrrr�s  rr�zSSLProtocol._do_shutdown�s���
	-��%�
&���#�#�%�%�%�
�"�"�$�$�$��#�#�%�%�%��&�&�t�,�,�,�,�,���	%�	%�	%��"�"�$�$�$�$�$�$��|�	,�	,�	,��&�&�s�+�+�+�+�+�+�+�+�+�����	,���s� A!�!B0�B0�B+�+B0c���|j� |j���d|_|r|�|��dS|j�|jj��dSr9)r�r�r�r1r�r�rL)r4�shutdown_excs  rrz!SSLProtocol._on_shutdown_complete�sk���(�4��)�0�0�2�2�2�,0�D�)��	8����l�+�+�+�+�+��J� � ���!6�7�7�7�7�7rc��|�tj��|j�|j���dSdSr9)r�r
rr�r�rEs rr�zSSLProtocol._abort�sB�����(�2�3�3�3��?�&��O�!�!�#�#�#�#�#�'�&rc��|jtjtjtjfvr;|jtjkrtj	d��|xjdz
c_dS|D]9}|j
�|��|xjt|��z
c_�:	|jtjkr|���dSdS#t $r!}|�|d��Yd}~dSd}~wwxYw)NzSSL connection is closedr�Fatal error on SSL protocol)r�r
rrrr�r�!LOG_THRESHOLD_FOR_CONNLOST_WRITESr�warningr�r�r�r�r
r�r�r�)r4r�r�exs    rr}zSSLProtocol._write_appdata�s&���K� �)� �)� �*��
�
���)�"M�M�M���9�:�:�:��O�O�q� �O�O��F� �	1�	1�D���&�&�t�,�,�,��#�#�s�4�y�y�0�#�#�#�	A��{�.�6�6�6���� � � � � �7�6���	A�	A�	A����b�"?�@�@�@�@�@�@�@�@�@�����	A���s�#)C�
C;�C6�6C;c�\�	|jr~|jd}|j�|��}t|��}||kr#||d�|jd<|xj|zc_n|jd=|xj|zc_|j�~n#t
$rYnwxYw|���dSr�)r�r�r�r�r�rr)r4r�count�data_lens    rr�zSSLProtocol._do_write�s���	��%�	
8��*�1�-����*�*�4�0�0���t�9�9���8�#�#�-1�%�&�&�\�D�'��*��+�+�u�4�+�+�+��+�A�.��+�+�x�7�+�+��%�	
8����	�	�	��D�	������� � � � � s�BB�
B�Bc��|jsB|j���}t|��r|j�|��|���dSr9)r�r�r�r�r�r�r]r~s  rrzSSLProtocol._process_outgoing�s\���'�	,��>�&�&�(�(�D��4�y�y�
,���%�%�d�+�+�+��!�!�#�#�#�#�#rc��|jtjtjfvrdS	|js`|jr|���n|���|jr|�	��n|�
��|���dS#t$r!}|�
|d��Yd}~dSd}~wwxYw)Nr )r�r
r
rrSr��_do_read__buffered�_do_read__copiedr�r�rrjr�r�)r4r#s  rr�zSSLProtocol._do_read�s���K� �(� �)� �
�
�

�F�	A��+�
-��/�,��+�+�-�-�-�-��)�)�+�+�+��&�-��N�N�$�$�$�$��*�*�,�,�,��%�%�'�'�'�'�'���	A�	A�	A����b�"?�@�@�@�@�@�@�@�@�@�����	A���s�A;B � 
C�*C�Cc�,��d}d}��������}t|��}	�j�||��}|dkr^|}||kr9�j�||z
||d���}|dkr||z
}nn#||k�9�j��fd���n#t$rYnwxYw|dkr��|��|s*��	����
��dSdS)Nrrc�,������Sr9)r�rEs�rr�z0SSLProtocol._do_read__buffered.<locals>.<lambda>�s��������r)r�rqr�r�r�r1r�rr�rrK)r4�offsetr%�buf�wantss`    rr)zSSLProtocol._do_read__buffered�sK��������+�+�D�,F�,F�,H�,H�I�I���C����	��L�%�%�e�S�1�1�E��q�y�y����u�n�n� �L�-�-�e�f�n�c�&�'�'�l�K�K�E��q�y�y��%������u�n�n��J�(�(�)@�)@�)@�)@�A�A�A����	�	�	��D�	�����A�:�:��-�-�f�5�5�5��	#��#�#�%�%�%�� � �"�"�"�"�"�	#�	#s�A?B=�=
C
�	C
c��d}d}d}		|j�|j��}|sn(|rd}d}|}n|rd}||g}n|�|���Jn#t$rYnwxYw|r|j�|��n/|s-|j�d�|����|s*|���|�	��dSdS)N�1TFr)
r�r�r�r�rrD�
data_received�joinrrK)r4�chunk�zero�one�firstrs      rr*zSSLProtocol._do_read__copieds3��������	�
'���)�)�$�-�8�8������'� �D��C�!�E�E��'��C�!�5�>�D�D��K�K��&�&�&�
'����	�	�	��D�	�����	=���,�,�U�3�3�3�3��	=���,�,�S�X�X�d�^�^�<�<�<��	#��#�#�%�%�%�� � �"�"�"�"�"�	#�	#s�AA�
A!� A!c�8�	|jtjkrBtj|_|j���}|rt
jd��dSdSdS#ttf$r�t$r!}|�|d��Yd}~dSd}~wwxYw)Nz?returning true from eof_received() has no effect when using sslzError calling eof_received())r�rrrrDr�rr"�KeyboardInterrupt�
SystemExit�
BaseExceptionr�)r4�	keep_openr#s   rrzSSLProtocol._call_eof_received s���
	B���"2�"A�A�A�"2�"<��� �.�;�;�=�=�	��C��N�$B�C�C�C�C�C�	B�A�C�C��"�:�.�	�	�	���	B�	B�	B����b�"@�A�A�A�A�A�A�A�A�A�����	B���s�AA�B�8B�Bc�:�|���}||jkrw|jspd|_	|j���dS#t
tf$r�t$r/}|j�	d||j
|d���Yd}~dSd}~wwxYw||jkrw|jrrd|_	|j���dS#t
tf$r�t$r/}|j�	d||j
|d���Yd}~dSd}~wwxYwdSdS)NTzprotocol.pause_writing() failed��message�	exceptionr�rAFz protocol.resume_writing() failed)
rfrbrtrD�
pause_writingr9r:r;r1�call_exception_handlerr�ra�resume_writing)r4�sizer�s   rr]z SSLProtocol._control_app_writing/s����*�*�,�,���4�,�,�,�T�5M�,�'+�D�$�

��"�0�0�2�2�2�2�2��%�z�2�
�
�
�� �
�
�
��
�1�1�@�!$�!%�!4� $�	3�3��������������
�����T�-�
-�
-�$�2J�
-�',�D�$�

��"�1�1�3�3�3�3�3��%�z�2�
�
�
�� �
�
�
��
�1�1�A�!$�!%�!4� $�	3�3��������������
����
.�
-�
-�
-s/�A
�
B�%$B�B�1C�D�'$D�Dc�*�|jj|jzSr9)r��pendingr�rEs rrfz"SSLProtocol._get_write_buffer_sizeLs���~�%��(?�?�?rc�^�t||tj��\}}||_||_dSr9)r,r�!FLOW_CONTROL_HIGH_WATER_SSL_WRITErbrar^s   rr\z$SSLProtocol._set_write_buffer_limitsOs7��,��#�y�B�D�D�	��c�$(��!�#&�� � � rc��d|_dSrJ)rSrEs rrVzSSLProtocol._pause_readingWs��#'�� � � rc�f���jr(d�_�fd�}�j�|��dSdS)NFc�
���jtjkr����dS�jtjkr����dS�jtjkr����dSdSr9)r�r
r
r�rr�rr�rEs�r�resumez+SSLProtocol._resume_reading.<locals>.resume^s}����;�"2�":�:�:��M�M�O�O�O�O�O��[�$4�$=�=�=��N�N�$�$�$�$�$��[�$4�$=�=�=��%�%�'�'�'�'�'�>�=r)rSr1r�)r4rLs` rrYzSSLProtocol._resume_readingZsW����#�
	)�',�D�$�
(�
(�
(�
(�
(�
�J� � ��(�(�(�(�(�
	)�
	)rc��|���}||jkr)|js"d|_|j���dS||jkr)|jr$d|_|j���dSdSdS)NTF)rqrnr�r�rWrmrZ)r4rDs  rrjz SSLProtocol._control_ssl_readingis����)�)�+�+���4�,�,�,�T�5M�,�'+�D�$��O�)�)�+�+�+�+�+�
�T�-�
-�
-�$�2J�
-�',�D�$��O�*�*�,�,�,�,�,�.�
-�
-�
-rc�^�t||tj��\}}||_||_dSr9)r,r� FLOW_CONTROL_HIGH_WATER_SSL_READrnrmr^s   rriz#SSLProtocol._set_read_buffer_limitsrs7��,��#�y�A�C�C�	��c�$(��!�#&�� � � rc��|jjSr9)r�rFrEs rrqz!SSLProtocol._get_read_buffer_sizexs
���~�%�%rc��	d|_dSrJ)r�rEs rrAzSSLProtocol.pause_writing}s��	�$(�� � � rc�>�	d|_|���dSr0)r�rrEs rrCzSSLProtocol.resume_writing�s)��	�$)�� ���� � � � � r�Fatal error on transportc�\�|jr|j�|��t|t��r5|j���rt
jd||d���dSdSt|tj	��s&|j�
|||j|d���dSdS)Nz%r: %sT)�exc_infor>)r�r�rw�OSErrorr1r�rr�r�CancelledErrorrB)r4r�r?s   rr�zSSLProtocol._fatal_error�s����?�	.��O�(�(��-�-�-��c�7�#�#�		��z�#�#�%�%�
E���X�t�W�t�D�D�D�D�D�D�
E�
E��C��!:�;�;�	��J�-�-�"� �!�_� �	/�/�
�
�
�
�
�	�	r)FNTNNr9r�)rS).rrrr�r�r�r�r7r@r�r�r�r�r�r�r�r:r�r�r�r�r�rKrr�r�rr�r}r�rr�r)r*rr]rfr\rVrYrjrirqrArCr�rrrr�r�s��������H� �� $��#��59�&*�'+�&*�	Q"�Q"�Q"�Q"�f	1�	1�	1�����#�#�#� � � �"2�"2�"2�H%�%�%�
 �
 �
 �!�!�!�F����$-�$-�$-�P��� ;�;�;�.�.�.�$�$�$�P���*C�C�C����
-�-�-�8�8�8�$�$�$�A�A�A�0!�!�!� $�$�$�A�A�A�,#�#�#�:#�#�#�<B�B�B����:@�@�@�'�'�'�'�(�(�(�)�)�)�-�-�-�'�'�'�'�&�&�&�
(�(�(�!�!�!�
�
�
�
�
�
rr�)r��enumr�r�ImportError�rrrr�logr�SSLWantReadError�SSLSyscallErrorr�Enumr
rr$r,�_FlowControlMixin�	Transportr.r�r�rrr�<module>ras�����������������J�J�J�J������
�C�C�C������������������������������������?��*�C�,?�@�N������t�y����
&�
&�
&�
&�
&�t�y�
&�
&�
&� ������*r;�r;�r;�r;�r;�J�8�&�0�r;�r;�r;�jV
�V
�V
�V
�V
�)�,�V
�V
�V
�V
�V
s���

ZeroDay Forums Mini