403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_asyncio/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_asyncio/__pycache__/test_sslproto.cpython-315.opt-1.pyc
R
>lqj9uc�n�Qs]PHs]PHs]PHs]PHs]QHGs]QHGs]QHG	s	]PH*s
]PH0s]QH0G
s
]QH0Gs]QH0Gs]QH@Gs]QH@GsQ	s\O,\
PIQ
2QQ\O.22sQ
Q\O22s\O,\
PIQ
2QQ\\O.22s\O,\
PIQ
2\O8\\Q2Q2QQ\\O.222s\Q6Xc\O@2P!P!\cPs
CKh9h)zTests for asyncio/sslproto.py.)�support)�
socket_helper)�mock)�log)�	protocols)�sslproto)�utils)�
functionalc�F�[OOP2P!�N)�asyncio�events�_set_event_loop_policy���4C:\Python315\\Lib\test\test_asyncio\test_sslproto.py�tearDownModulers���N�N�)�)�$�/rz
No ssl modulec�``�\sQs]snU1QksQPQP-QksQP-QksQsQsQ	s	Q
s
QsQsQ
s
QsQsQsQsQsQsUsU9s!)�SslProtoHandshakeTestsc�:�[RU_2[O2UmUOUO2P!r
)�super�setUpr�new_event_loop�loop�set_event_loop)�self�	__class__s&�rr�SslProtoHandshakeTests.setUps.���
��
���*�*�,��	����D�I�I�&r�waiter�protoc�J�[O2oUe[O2o[O
UOV#UQQ5oUOUOO2U2UOUOO2U!)Ng�������?��ssl_handshake_timeout)�
test_utils�dummy_ssl_contextr�Protocolr�SSLProtocolr�assertIs�_app_transport�get_protocol�
addCleanup�close)rrr�
sslcontext�	ssl_protos&$$  r�ssl_protocol�#SslProtoHandshakeTests.ssl_protocol#s|���1�1�3�
��=��$�$�&�E��(�(����E�v�?B�D�	��
�
�i�.�.�;�;�=�u�E����	�0�0�6�6�7��r�do_handshakec��[O2o[O2o[OUOm[OUOmUdV$mVAmUOU2U!r
)
r�Mock�ssl�SSLWantReadError�read�side_effect�writer/�_sslobj�connection_made)rr,r/�	transport�sslobjs&&$  rr8�&SslProtoHandshakeTests.connection_made-sb���I�I�K�	������"%�"6�"6�����#&�#7�#7���� ��#�".��"���!�!�)�,��rc
�D�[O2o[O2o[O2oUO	[
Q29^tt^2[OUOV!U]Q5PPP2P!)%fhP!9h)�a positive numberr �	r"r#rr1�assertRaisesRegex�
ValueErrorrr%r�rr+�	app_protors&   r�test_handshake_timeout_zero�2SslProtoHandshakeTests.test_handshake_timeout_zero9se���1�1�3�
��I�I�K�	������
�
#�
#�J�0C�
D�
D�� � ����I�6�78�
:�E�
D�
D�
D���%B�B	�B	c
�D�[O2o[O2o[O2oUO	[
Q29^tt^2[OUOV!UQQ5PPP2P!)%fhP!9h)r=r i����r>rAs&   r�test_handshake_timeout_negative�6SslProtoHandshakeTests.test_handshake_timeout_negativeAse���1�1�3�
��I�I�K�	������
�
#�
#�J�0C�
D�
D�� � ����I�6�7:�
<�E�
D�
D�
D�rEc�t�UOO2oUOUQ5oUOU[O
[OQ5Q5UO2[OUO2UOUO2[2P!��r�r5)r/)r�
create_futurer-r8rr1r2r3�eof_receivedr"�run_briefly�assertIsInstance�	exception�ConnectionResetError�rrr,s&  r�test_eof_received_waiter�/SslProtoHandshakeTests.test_eof_received_waiterIs������(�(�*���%�%�V�%�4�	��������s�/C�/C�D�	�	
�	��� ����t�y�y�)����f�.�.�0�2F�Grc��UOO2oUOUQ5o[OO2o[OO
[O2UOP2[OO
U2P![OO
S2h9h�rK)
rrMr-r�logger�getEffectiveLevel�setLevel�logging�FATAL�_fatal_error)rrr,�	log_levels&   r�test_fatal_error_no_name_error�5SslProtoHandshakeTests.test_fatal_error_no_name_errorTs������(�(�*���%�%�V�%�4�	��J�J�0�0�2�	��
�
���G�M�M�*�	+��"�"�4�(�
�J�J���	�*��C�J�J���	�*�s�:B,�,!C
c�~�UOO2oUOUQ5oUOU[O
[OQ5Q5UO[2[OUO2UOUO2[2P!rJ)rrMr-r8rr1r2r3�connection_lost�ConnectionAbortedErrorr"rOrPrQrSs&  r�test_connection_lost�+SslProtoHandshakeTests.test_connection_lostcs������(�(�*���%�%�V�%�4�	��������s�/C�/C�D�	�	
�	�!�!�"8�9����t�y�y�)����f�.�.�0�2H�Irc�``	`
�[O2o[OQQ5Um[O[Q5Um[
OQROQ5o[
OUROQ5oROUQ5o[O2o[OUOm
[OUOm
VTmQn	[O2o[OR	Q5Um[!R	2UmVdmROO'V2UO(o[
O*VsURO2n
U	UU
1QkoROO-U22P!)	i90)�return_valuerL)�limitr�r�rsAn interesting messagec���: �UU1QkoU2EPiw�K
RO[29^tt^2U2EPiw�K
PPP2P!K=K)%fhP!9h3h)c��l: �ROR2RO2EPiw�K
P!K3hr
)r6�drain)�data�writers��rr6�RSslProtoHandshakeTests.test_connection_lost_when_busy.<locals>.main.<locals>.write�s!�������T�"��l�l�n�$�$�s�'4�2�4)�assertRaisesrR)r6rnrros ���r�main�CSslProtoHandshakeTests.test_connection_lost_when_busy.<locals>.main�sP����
%�
�'�M�M��"�"�#7�8�8��g�
�
�9�8�
��9�8�8�s>�A.�A�"A.�A�A
�A�A.�A�A+	�#A+	�%	A.i)rr1�fileno�BrokenPipeError�sendr�StreamReaderr�StreamReaderProtocolr-r2r3r4r5r6r7�len�pending�	_outgoing�_make_socket_transportr'�StreamWriter�run_until_complete)r�sock�reader�protocolr,r:�outgoingr9rrrnrosf        @@r�test_connection_lost_when_busy�5SslProtoHandshakeTests.test_connection_lost_when_busyps.����y�y�{���i�i�U�3����I�I�/�:��	��%�%�G�$�)�)�D���/�/��T�Y�Y�G���%�%�H�%�5�	������"%�"6�"6�����#&�#7�#7���� �"��)���9�9�;���	�	�t�4��
��t�9���&��	
�	�	�(�(��9��,�,�	��%�%�i�6�4�9�9�M��	�	
�	�	�$�$�T�V�,rc��UOO2oUOUQ5oUOU[O
[OQ5Q5o[OUO2UOO2UOUOO2P!rJ)rrMr-r8rr1r2r3r"rOr'r*�
assertTrue�_force_close�called)rrr,r9s&   r�test_close_during_handshake�2SslProtoHandshakeTests.test_close_during_handshake�s������(�(�*���%�%�V�%�4�	��(�(�����s�/C�/C�D�)�
�	�	���t�y�y�)�� � �&�&�(����	�.�.�5�5�6rc�`�UOUO2Q5oUOU2,nUOOU1Qk2UOO2UO
R,2P!)rjc�(:�ROU2!r
��append�r�ctx�messagess&&�r�<lambda>�GSslProtoHandshakeTests.test_close_during_ssl_over_ssl.<locals>.<lambda>�����(�/�/�#�:Nr)r-r8r�set_exception_handlerr'r*�assertEqual)r�outerr�s& @r�test_close_during_ssl_over_ssl�5SslProtoHandshakeTests.test_close_during_ssl_over_ssl�si����!�!��(9�(9�(;�!�<�����U�#����	�	�'�'�(N�O�
���"�"�$�����2�&rc��UOO2oUOUQ5oUOUO	Q22[2oUO
UO	QU2U2UOU2UOUO	Q22UOP2UOUO	Q22P!)rK�socket)
rrMr-�assertIsNone�_get_extra_info�objectr&r8�assertIsNotNonerb)rrr,�defaults&   r�(test_get_extra_info_on_closed_connection�?SslProtoHandshakeTests.test_get_extra_info_on_closed_connection�s������(�(�*���%�%�V�%�4�	����)�3�3�H�=�>��(���
�
�i�/�/��'�B�G�L����Y�'����Y�6�6�x�@�A��!�!�$�'����)�3�3�H�=�>rc�L�UOO2oUOUQ5o[O2oUO
O
U2UOUO
O2U2UOUOU2P!rW)
rrMr-rr$r'�set_protocolr&r(�
_app_protocol)rrr,�
new_app_protos&   r�test_set_new_app_protocol�0SslProtoHandshakeTests.test_set_new_app_protocol�sz�����(�(�*���%�%�V�%�4�	��(�(�*�
�� � �-�-�m�<��
�
�i�.�.�;�;�=�}�M��
�
�i�-�-�}�=rc���UO2oUOU2UOoUO2UO	UO]22P!)�)r-r8r'r*r��buffer_updated�rr,�transps&  r� test_data_received_after_closing�7SslProtoHandshakeTests.test_data_received_after_closing�sM���%�%�'�	����Y�'��)�)������	
���)�2�2�1�5�6rc���UO2oUOU2UOoUO2UO	UOQ22P!)sdata)r-r8r'r*r�r6r�s&  r�test_write_after_closing�/SslProtoHandshakeTests.test_write_after_closing�sK���%�%�'�	����Y�'��)�)������	
���&�,�,�w�/�0rri)�__name__�
__module__�__qualname__�__firstlineno__rr-r8rCrGrTr_rdr�r�r�r�r�r�r��__static_attributes__�__classdictcell__�
__classcell__)r�
__classdict__s@@rrrsm����'�
�T����
��
�:�<�	H�
+�J�.-�`7�
'�	?�>�7�1�1rrc��`�\sQs]�snQs\OsQsQs	Qs
Qs\OQ2sQs\OQ2sQsQ	sQ
sQsQsQ
sUsP!)�BaseStartTLSc��[gr
)�NotImplementedError�rs&r�new_loop�BaseStartTLS.new_loop�s��!�!rc	�b�QQ[O2oQFCDwoU]U2o[OUQ2UO	UO
Q2U]U2o[OUQ2UO	UO
Q2U]U2o[OUQ2UO	UO
Q2U]U2o[OUQ2UO	UO
Q2U]dU2o[OUQ2UO	UO
Q2U]U2oUO
[Q29^tt^2[OUQ2PPP2CJz	P!)%fhCJ�9h)c�4`�\sQs]�snQsQsQsQsUsP!)�.BaseStartTLS.test_buf_feed_data.<locals>.Protoc�v�[U2Um[UO2UmQUmV mP!�r)�	bytearray�buf�
memoryview�mvrn�usemv)r�bufsizer�s&&&r�__init__�7BaseStartTLS.test_buf_feed_data.<locals>.Proto.__init__�s*��$�W�-���$�T�X�X�.�����	�"�
rc�X�UO%c
UO!UO!r
)r�r�r��r�sizehints&&r�
get_buffer�9BaseStartTLS.test_buf_feed_data.<locals>.Proto.get_buffer�s���:�:�:��7�7�N��8�8�Orc���UO%c)U9OUOPU*
tmP!U9OUOPU*
tmP!r
)r�rnr�r�)r�nsizes&&rr��=BaseStartTLS.test_buf_feed_data.<locals>.Proto.buffer_updated�s<���:�:�:��I�I�����%��0�I��I�I����&�5�!1�1�Ir)r�rnr�r�)	r�r�r�r�r�r�r�r�r��r�s@r�Protor��s����
#�
$�
2�
2rr�s12345s1234zempty buffer)FT)r�BufferedProtocolr�_feed_data_to_buffered_protor�rnr?�RuntimeError)rr�r�rs&   r�test_buf_feed_data�BaseStartTLS.test_buf_feed_data�sP��	2�G�,�,�	2�(#�E��!�U�O�E��2�2�5�(�C����U�Z�Z��2��!�U�O�E��2�2�5�(�C����U�Z�Z��2��!�U�O�E��2�2�5�'�B����U�Z�Z��1��!�U�O�E��2�2�5�'�B����U�Z�Z��1��#�u�%�E��2�2�5�(�C����U�Z�Z��2��!�U�O�E��'�'��n�E�E��6�6�u�h�G�F�E�-#�,F�E�E�s�5F	�F.
�%F.
c	�`````�QRO*n[O2n[O2nUUU1QkoU1QkQ[O
2nUUUU1QkoRO
UROQ59^tt^2oROO[OUUO2[OQ52PPP2[OR2n[O 2RO#R22P!)%fhKS9h)�1c��:�UORO2UO[R22oRO	[U2[R22UORP	Q5UO
Q2UO[R22oRO	[U2[R22UO[O2UO2P!�T��server_side�O��
settimeout�TIMEOUT�recv_allryr��	start_tls�sendall�shutdownr��	SHUT_RDWRr*�rrn�	HELLO_MSGr�server_contexts& ���r�serve�=BaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.serve#s�����O�O�D�L�L�)��=�=��Y��0�D����S��Y��I��7��N�N�>�t�N�<��L�L����=�=��Y��0�D����S��Y��I��7��M�M�&�*�*�+��J�J�Lrc�B:`�\sQsQsnQsU1QksQsQsQsUs	P!)�CBaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.ClientProto�2c�.�VmV m]UmP!����on_data�on_eof�con_made_cnt�rr�r�s&&&rr��LBaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.ClientProto.__init__3���&��$��$%��!rc�t:�U9O]*
tmROUO]2P!���r�r��r�trrs&&�rr8�SBaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.ClientProto.connection_made8�*����"�"�a�'�"�� � ��!3�!3�Q�7rc�>�UOOU2P!r
�r��
set_result�rrns&&r�
data_received�QBaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.ClientProto.data_received=������'�'��-rc�>�UOOP	2P!�T�r�r	r�s&rrN�PBaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.ClientProto.eof_received@������&�&�t�,r�r�r�r��
r�r�r�r�r�r8rrNr�r��r�rs@�r�ClientProtor�2�����
&�

8�

.�
-�
-rrc��4:`` �[OQ2EPiw�K
R	OO2nR	OO2nR	OOUUU1Qk,UN3EPiw�K
vqUOR2R	OO
VR2EPiw�K
oR	OREPiw�K
Q2UOR2REPiw�K
UO2P!K�K�KSK>K3h)��?c�:�RRR2!r
r�rr�r�s���rr��PBaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.client.<locals>.<lambda>J�����G�V�4rr�)	r�sleeprrM�create_connectionr6r�r�r*)
�addrrr�new_trr�r�rr��client_contextrs
&   @@����r�client�>BaseStartTLS.test_start_tls_client_reg_proto_1.<locals>.clientCs������-�-��$�$�$��i�i�-�-�/�G��Y�Y�,�,�.�F�"�i�i�9�9�4�=�7;�=�=�=�I�B�
�H�H�Y���9�9�.�.�r�.�I�I�I�F����7�]�]�D�1��L�L��#��L�L��L�L�N�
%�
=�J�*��sX�D�D�A"D�D�8D�=D�>D�D
�!D�6D�7D�D�D�D�D��timeout��PAYLOAD_SIZEr"�simple_server_sslcontext�simple_client_sslcontextrr$�
tcp_serverr�rr~�wait_forr r�
SHORT_TIMEOUT�weakref�ref�
gc_collectr��rr�r#�srvrr�r"r�sf   @@@@r�!test_start_tls_client_reg_proto_1�.BaseStartTLS.test_start_tls_client_reg_proto_1s�����4�,�,�,�	�#�<�<�>��#�<�<�>��
	�	-�'�*�*�	-�"	�	�$�_�_�U�D�L�L�_�
9�
9�S��I�I�(�(�� � �����!1�)0�)>�)>�@�
A�:�!���^�4���������.�*�+�:�
9���AD1�1E	�:E	c	�`````�QRO*n[O2n[O2nUUU1QkoU1QkQ[O
2nUUUU1QkoRO
UROQ59^tt^2oROO[OUUO2[OQ52PPP2[OR2n[O 2RO#R22P!)%fhKS9h)r�c�b:�UORO2UORP	Q5UOQ2UO	[R22oRO
[U2[R22UO[O2UO2P!r�)r�r�r�r�r�ryr�r�r�r�r*r�s& ���rr��>BaseStartTLS.test_create_connection_memory_leak.<locals>.serveest����O�O�D�L�L�)��N�N�>�t�N�<��L�L����=�=��Y��0�D����S��Y��I��7��M�M�&�*�*�+��J�J�Lrc�B:`�\sQsQsnQsU1QksQsQsQsUs	P!)�DBaseStartTLS.test_create_connection_memory_leak.<locals>.ClientProto�qc�.�VmV m]UmP!r�r�r�s&&&rr��MBaseStartTLS.test_create_connection_memory_leak.<locals>.ClientProto.__init__rr�rc�:�VmU9O]*
tmROUO]2P!r)rr�r�rs&&�rr8�TBaseStartTLS.test_create_connection_memory_leak.<locals>.ClientProto.connection_madews/������"�"�a�'�"�� � ��!3�!3�Q�7rc�>�UOOU2P!r
rr
s&&rr�RBaseStartTLS.test_create_connection_memory_leak.<locals>.ClientProto.data_received~r
rc�>�UOOP	2P!rrr�s&rrN�QBaseStartTLS.test_create_connection_memory_leak.<locals>.ClientProto.eof_received�rrrrrs@�rrr:qs����
&�

8�
.�
-�
-rrc���:`` �[OQ2EPiw�K
ROO2nROO2nROOUUU1Qk,UN3QR-EPiw�K
vqROREPiw�K
Q2UO
R2REPiw�K
UO2P!K�KSK<K3h)rc�:�RRR2!r
rrs���rr��QBaseStartTLS.test_create_connection_memory_leak.<locals>.client.<locals>.<lambda>�rrr2r�)rrrrMrr�r6r*)	r rrr�r�rr�r"rs	&  @@����rr#�?BaseStartTLS.test_create_connection_memory_leak.<locals>.client�s������-�-��$�$�$��i�i�-�-�/�G��Y�Y�,�,�.�F�"�i�i�9�9�4�$�7;�$�"�$�$�$�I�B�
���7�]�]�D�1��H�H�Y���L�L��H�H�J�
%�
$�+��sF�C!�C�A$C!�C�C!�C
� !C!�C�C!�C!�C!�C!r%r'r1sf   @@@@r�"test_create_connection_memory_leak�/BaseStartTLS.test_create_connection_memory_leak_s�����4�,�,�,�	�#�<�<�>��#�<�<�>��
	�	-�'�*�*�	-�&	�	� �_�_�U�D�L�L�_�
9�
9�S��I�I�(�(�� � �����!1�)0�)>�)>�@�
A�:�!���^�4���������.�*�+�:�
9�r5c	�F```````	�QRO*n[O2n	[O2n]nUUU	1QkoUU1QkQ[O
2nU1QkQ[O2nUUUUUU1QkoROUROQ59^tt^2oROO[OUUO2ROQ52PPP2P!)%fhP!9h)r�c�|:�UORO2UO[R22oRO	[U2[R22UORP	Q5UO
Q2UO[R22oRO	[U2[R22UO
Q2UO[R22oRO	[U2[R22UO[O2UO2P!)Tr�r��2r�r�s& ���rr��=BaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.serve�s�����O�O�D�L�L�)��=�=��Y��0�D����S��Y��I��7��N�N�>�t�N�<��L�L����=�=��Y��0�D����S��Y��I��7��L�L����=�=��Y��0�D����S��Y��I��7��M�M�&�*�*�+��J�J�Lrc�H:`�\sQsQsnQsU1QksQsU1QksQsUs	P!)�HBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoFirst�c�4�Vm[]2UmP!r)r�r�r�)rr�s&&rr��QBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoFirst.__init__�s��&��$�Q�<��rc�:�R]*
nP!rr�rr�client_con_made_callss&&�rr8�XBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoFirst.connection_made�����%��*�%rc��UO!r
)r�r�s&&rr��SBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoFirst.get_buffer�s���x�x�rc�:�ROU]2UOO[UOPU22P!r)r�r�r	�bytesr�)�slfr�rs&&�rr��WBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoFirst.buffer_updated�s4���� � ���*����&�&�u�S�W�W�V�e�_�'=�>r)r�r�)
r�r�r�r�r�r8r�r�r�r�)r�rUrs@��r�ClientProtoFirstrO�s����
(�
+�
 �
?�
?rr^c�B:`�\sQsQsnQsU1QksQsQsQsUs	P!)�IBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoSecond��c�.�VmV m]UmP!r�r�r�s&&&rr��RBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoSecond.__init__�r�rc�:�R]*
nP!rrrTs&&�rr8�YBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoSecond.connection_made�rWrc�>�UOOU2P!r
rr
s&&rr�WBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoSecond.data_received�r
rc�>�UOOP	2P!rrr�s&rrN�VBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.ClientProtoSecond.eof_received�rrrr)r�rUs@�r�ClientProtoSecondr`�s����
&�

+�
.�
-�
-rrjc��:` �[OQ2EPiw�K
ROO2nROO2oROO2oROOUU1Qk,UN3EPiw�K
vq4UOR	2ROO
V4R2EPiw�K
oROREPiw�K
Q2UOR	2UORV22ROUEPiw�K
Q2UOR	2UEPiw�K
UO2ROR
]2P!CK[K�K�K�KSK33h)rc�:�RR2!r
r)r^�on_data1s��rr��PBaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.client.<locals>.<lambda>�s���(��2rr�rL)
rrrrMrr6r�r�r�r*)
r �on_data2r�rrr!rmr^rjr�rUr"rs
&     @������rr#�>BaseStartTLS.test_start_tls_client_buf_proto_1.<locals>.client�s5�����-�-��$�$�$��y�y�.�.�0�H��y�y�.�.�0�H��Y�Y�,�,�.�F�"�i�i�9�9�2�;�59�;�;�;�I�B�
�H�H�Y���9�9�.�.�r�.�I�I�I�F����8�^�^�T�2��L�L��#���� 1�(� C�D����8�^�^�T�2��L�L��#��L�L��L�L�N�

���2�A�6�3
%�;�J�+�,��sk�F	�E<�A;F	�E?�8F	�F�F	�,F
�-AF	�0F
�1!F	�F�*F	�?F	�F	�F	�F	�F	r%)
r(r"r)r*rr�r$r+r�rr~r,r )
rr�r#r2r^rjr�rUr"r�s
f   @@@@@@r�!test_start_tls_client_buf_proto_1�.BaseStartTLS.test_start_tls_client_buf_proto_1�s�����4�,�,�,�	�#�<�<�>��#�<�<�>�� !��	�&	?�	?�w�7�7�	?� 	-�� 0� 0�	-� 	7�	7�8�_�_�U�D�L�L�_�
9�
9�S��I�I�(�(�� � �����!1�)-���7�
8�:�
9�
9�
9�s�9AD�D 	�D 	c	�`````�QRO*n[O2nROO	2nUUU1QkoU1QkQ[
O2nUUUUU1QkoROUROQ59^tt^2oROO[
OUUO2[OQ52PPP2P!)%fhP!9h)r�c�:�UORO2UO[R22oRO	[U2[R22RO
O
ROP2UOQ2oUO2P![cKh9hSO2h9h)N�)
r�r�r�ryr�r�call_soon_threadsafer	rcr*)rrnr�r�server_waits_on_handshakes& ���rr��=BaseStartTLS.test_start_tls_slow_client_cancel.<locals>.serves�����O�O�D�L�L�)��=�=��Y��0�D����S��Y��I��7�
��	�	�.�.�-�8�8�$�@��}�}�[�1���
�
���*�
��
���
�
��s*�7B&�&	B4�0B4�1B7�3B4�4B7�7C	c�B:`�\sQsQsnQsU1QksQsQsQsUs	P!)�CBaseStartTLS.test_start_tls_slow_client_cancel.<locals>.ClientProto�c�.�VmV m]UmP!r�r�r�s&&&rr��LBaseStartTLS.test_start_tls_slow_client_cancel.<locals>.ClientProto.__init__r�rc�t:�U9O]*
tmROUO]2P!rrrs&&�rr8�SBaseStartTLS.test_start_tls_slow_client_cancel.<locals>.ClientProto.connection_maderrc�>�UOOU2P!r
rr
s&&rr�QBaseStartTLS.test_start_tls_slow_client_cancel.<locals>.ClientProto.data_receivedr
rc�>�UOOP	2P!rrr�s&rrN�PBaseStartTLS.test_start_tls_slow_client_cancel.<locals>.ClientProto.eof_receivedrrrrrs@�rrrzrrrc	��h:`` �[OQ2EPiw�K
ROO2nROO2nROOUUU1Qk,UN3EPiw�K
vqUOR2R	EPiw�K
RO
[O29^tt^2[OROOVR2Q2EPiw�K
PPP2P!K�K�KuK)%fhP!9h3h)rc�:�RRR2!r
rrs���rr��PBaseStartTLS.test_start_tls_slow_client_cancel.<locals>.client.<locals>.<lambda>(rr)
rrrrMrr6rq�TimeoutErrorr,r�)
r rrr�r�rr�r"rrws
&  @@�����rr#�>BaseStartTLS.test_start_tls_slow_client_cancel.<locals>.client!s������-�-��$�$�$��i�i�-�-�/�G��Y�Y�,�,�.�F�"�i�i�9�9�4�=�7;�=�=�=�I�B�
�H�H�Y��+�+�+��"�"�7�#7�#7�8�8��&�&��I�I�'�'��>�B�����9�8�
%�
=�

,��9�8�8�sd�D2�D�A"D2�D�D2�#D�$,D2�6D�D
�D�D2�D2�D2�D�D/	�'D/	�)	D2r%)r(r"r*rrMrr$r+r�r~r,r rr-)rr�r#r2rr�r"rwsf   @@@@r�!test_start_tls_slow_client_cancel�.BaseStartTLS.test_start_tls_slow_client_cancel�s�����4�,�,�,�	�#�<�<�>��$(�I�I�$;�$;�$=�!�
	�	-�'�*�*�	-�"	�	�$�_�_�U�D�L�L�_�
9�
9�S��I�I�(�(�� � �����!1�)0�)>�)>�@�
A�:�
9�
9�
9�s�AC6�6D	�?D	c�P`````````	�QRO*nQn[O2n	[O2nPnUUUUU1QknU1QkQ[O
2nUUUU	1QknUUUUUU1QkoROOU22P!)r�sanswerc�v:�UORO2UOU2UO[	R22oRO[	U2[	R22UO
R2UOR2UO[	R22nUO2P!r
)	r�r��connectr�ryr�r�r�r*)rr rn�ANSWERr��answerr"rs&& �����rr#�4BaseStartTLS.test_start_tls_server_1.<locals>.clientAs|����O�O�D�L�L�)��L�L����=�=��Y��0�D����S��Y��I��7��N�N�>�*��L�L��#��]�]�3�v�;�/�F��J�J�Lrc�H:`�\sQsQsnQsQsQsU1QksQsQs	Us
P!)�9BaseStartTLS.test_start_tls_server_1.<locals>.ServerProto�Nc�H�VmV mV0mQUmPUmP!r�)�on_con�on_con_lost�on_got_hellornr9)rr�r�r�s&&&&rr��BBaseStartTLS.test_start_tls_server_1.<locals>.ServerProto.__init__Os!��$��#.� �$0�!���	�!%��rc�J�VmUOOU2P!r
)r9r�r	�rrs&&rr8�IBaseStartTLS.test_start_tls_server_1.<locals>.ServerProto.connection_madeVs��!#�����&�&�r�*rc��VmP!r
)r9r�s&&r�replace_transport�KBaseStartTLS.test_start_tls_server_1.<locals>.ServerProto.replace_transportZs��!#�rc�:�U9OU*
tm[UO2[R26�cUOOP2P!P!r
)rnryr�r	)rrnr�s&&�rr�GBaseStartTLS.test_start_tls_server_1.<locals>.ServerProto.data_received]s>����	�	�T�!�	��t�y�y�>�S��^�3��%�%�0�0��6�4rc��PUmUeUOOP2P!UOOU2P!r
)r9r�r	�
set_exception)r�excs&&rrb�IBaseStartTLS.test_start_tls_server_1.<locals>.ServerProto.connection_lostbs6��!%����;��$�$�/�/��5��$�$�2�2�3�7r)rnr�r�r�r9)r�r�r�r�r�r8r�rrbr�r�)r�r�s@�r�ServerProtor�Ns#����
&�
+�
$�
7�

8�
8rr�c���: �UEPiw�K
oUOR2ROUOQ2ROO	V@R	P	RO
Q5EPiw�K
oUO
U2UEPiw�K
UOR2UEPiw�K
ROUOR2UO2P!K�KnKSK83h)Nr)r�r!)r6r�rnrr�r�r�r*)
rr�r�r�rr!r�r�rr�s
&&&&  ����rrr�2BaseStartTLS.test_start_tls_server_1.<locals>.mainis��������B��H�H�Y�����U�Z�Z��-��9�9�.�.��>� �&*�l�l�/�4�4�4�F�
�#�#�F�+�����L�L�� �������U�Z�Z��3��L�L�N�!�
4�
�
�sF�C!�C�AC!�+C�,C!�C�	C!�%C�&4C!�C!�C!�C!c
���:`` �ROO2oROO2oROO2oRVU2nROOU1QkQ]2EPiw�K
oUO]*O	2nROUU	1QkROQ59^tt^2[OR
RVU2ROQ5EPiw�K
PPP2UO2UO2EPiw�K
RORR2P!K�KL)%fhKR9hK/3h)c�
:�R!r
rrjs�rr��HBaseStartTLS.test_start_tls_server_1.<locals>.run_main.<locals>.<lambda>�s���rz	127.0.0.1c�:�RUR2!r
r)rr r#s&��rr�r��s���f�T�4�.@rr%)rrM�
create_server�sockets�getsockname�
tcp_clientr�rr,r*�wait_closedr�)r�r�r��serverr rr�r�r�r#rrrs    @@������r�run_main�6BaseStartTLS.test_start_tls_server_1.<locals>.run_main|s�����Y�Y�,�,�.�F��)�)�1�1�3�K��9�9�2�2�4�L���\�B�E��9�9�2�2��{�A�/�/�/�F��>�>�!�$�0�0�2�D����!@�)-���!�7�7��&�&����\�B� �L�L�*�*�*�7�
�L�L�N��$�$�&�&�&����V�V�,�/�*�7�7��
'�sO�A>E(�E�AE(�/E�E
�E�	,E(�5E&�6E(�E�E#	�E#	�	E()r(r"r)r*rr$rr~)
rr�r�r�r�r�r#r"rrr�s
f @@@@@@@@r�test_start_tls_server_1�$BaseStartTLS.test_start_tls_server_18s������4�,�,�,�	���#�<�<�>��#�<�<�>����	�	�	8�'�*�*�	8�6	�	�&	-�	-�(	
�	�	�$�$�X�Z�0rc�V`�U1QkoROOU22P!)c���: �RO[Q29^tt^2ROOPPP2EPiw�K
PPP2[O
2oRO[Q29^tt^2ROOPPU2EPiw�K
PPP2P!Kq)%fhKw9hK#)%fhP!9h3h)zSSLContext, gotzis not supported)r?�	TypeErrorrr�r"r))�sslctxrs �rrr�4BaseStartTLS.test_start_tls_wrong_args.<locals>.main�s������'�'�	�3D�E�E��i�i�)�)�$��d�;�;�;�F� �8�8�:�F��'�'�	�3E�F�F��i�i�)�)�$��f�=�=�=�G�F�<�F�E��
>�G�F�F�sd� C#�"B:�B8
�B:�;C#�"C�(C
�)C�.
C#�8B:�:C
	�C
	�C#�
C�C 	�C 	�	C#)rr~)rrrsf r�test_start_tls_wrong_args�&BaseStartTLS.test_start_tls_wrong_args�s���	>�	
�	�	�$�$�T�V�,rc	�````�[O2n,nROOU1Qk2P
nU1QkoUU1QkoRO	U]]Q59^tt^2oRO[O29^tt^2ROOUUO22PPP2PPP2ROR2ROR,2[OR2n[O2RO!R22P!)%fhK~9h)%fhK�9h)c�(:�ROU2!r
r�r�s&&�rr��5BaseStartTLS.test_handshake_timeout.<locals>.<lambda>�r�rc�:�UOQ2UO2P![cP	nK!h9hSO2h9h��ru�r�rcr*)r�server_side_aborteds&�rr��3BaseStartTLS.test_handshake_timeout.<locals>.server�sB���
��
�
�k�*��
�
���*�
+�&*�#�
+���
�
��s�'�	7�7�:�7�:�Ac���: �[OROO[O,UN3QRQPQ[
O-Q2EPiw�K
P!K3h)r2�server_hostnamer!r)rr,rrr$rr-)r �
client_sslctxrs&��rr#�3BaseStartTLS.test_handshake_timeout.<locals>.client�so�����"�"��	�	�+�+��$�$�A��A�&�A�%'�	A�
+2�*?�*?�A���
�
�s�AA)�A'� A)��max_clients�backlog)r"r*rr�r+rqrr�r~r r�r�r.r/rr0r�)rr�r#r2r�r�r�sf   @@@r�test_handshake_timeout�#BaseStartTLS.test_handshake_timeout�s����#�;�;�=�
����	�	�'�'�(N�O�#��	�	��_�_�V�)*�%&��(�(�+.��"�"�7�#7�#7�8�8��	�	�,�,�V�C�H�H�-=�>�9�	(�	
���+�,�	
����2�&� ���M�2�
��������-�/�*�9�8��	(�(�s0�'(E�,D1	�;E�1E
�:E
�<E�E	�
E	c	��``�[O2n,nUOOU1Qk2QoU1QkoUO	U]]Q59^tt^2oUO[Q29^tt^2UOOUUO22PPP2PPP2UOR,2P!)%fhK,9h)%fhK79h)c�(:�ROU2!r
r�r�s&&�rr��HBaseStartTLS.test_create_connection_ssl_slow_handshake.<locals>.<lambda>�r�rc��UOQ2UO2P![cKh9hSO2h9hr�r�)rs&rr��FBaseStartTLS.test_create_connection_ssl_slow_handshake.<locals>.server�s>��
��
�
�k�*��
�
���*�
��
���
�
��s�&�	4�4�7�4�7�A	c	��d: �[OUQRQPQQ-EPiw�K
vqP!K3h)r2r�r!g�?)r�open_connection�r r�ror�s&  �rr#�FBaseStartTLS.test_create_connection_ssl_slow_handshake.<locals>.client�sH����#*�#:�#:��$+�!�$+�!#�$+�'*�	$+�+�+�N�F�F�+�s�!0�.�
0r�zSSL handshake.*is taking longer)
r"r*rr�r+r?rcr~r r�)rr�r#r2r�r�s&   @@r�)test_create_connection_ssl_slow_handshake�6BaseStartTLS.test_create_connection_ssl_slow_handshake�s����"�;�;�=�
����	�	�'�'�(N�O�	�	+��_�_�V�)*�%&��(�(�+.��'�'�*�6�8�8��	�	�,�,�V�C�H�H�-=�>�	8�	(�	
����2�&�
8�8��	(�(�s0�C!�>,C	�*C!�C
�C
�C!�!C1	�*C1	c	�``�UOOQ2[O2n[OP
Q5nU1QkoU1QkoUOU]]Q59^tt^2oUO
[O29^tt^2UOOUUO22PPP2PPP2P!)%fhK9h)%fhP!9h)c��P!r
r�rr�s&&rr��LBaseStartTLS.test_create_connection_ssl_failed_certificate.<locals>.<lambda>����$r)�disable_verifyc��:�UORP	Q5UO	2P![OcK)[cK5h9hSO	2h9h)Tr�)r�r2�SSLError�OSErrorr*)rr�s&�rr��JBaseStartTLS.test_create_connection_ssl_failed_certificate.<locals>.server�sY���	
����� $��&��
�
����<�<�
���
��
���
�
��s7�)�A
�A
�A�A
�	A
�
A�A
�
A�A"c	��: �[OUQRQPQ[O-EPiw�K
vqP!K3h)r2r�r!)rr�r�LOOPBACK_TIMEOUTr�s&  �rr#�JBaseStartTLS.test_create_connection_ssl_failed_certificate.<locals>.clientsU����#*�#:�#:��$@�!�$@�!#�$@�'.�&>�&>�	$@�@�@�N�F�F�@�s�/>�<�
>r�)rr�r"r)r*r+rqr2�SSLCertVerificationErrorr~r )rr�r#r2r�r�s&   @@r�-test_create_connection_ssl_failed_certificate�:BaseStartTLS.test_create_connection_ssl_failed_certificate�s�����	�	�'�'�(>�?��4�4�6��"�;�;� �"�
�
	�	@��_�_�V�)*�%&��(�(�+.��"�"�3�#?�#?�@�@��	�	�,�,�V�C�H�H�-=�>�A�	(�(�A�@��	(�(�(�s0�4(C-�,C	�C-�C*
�#C*
�%C-�-C>	�6C>	c�```�ROOQ2[O2n[O2nU1QkoUU1QkoROU]]Q59^tt^2oROO
UUO22oPPP2ROWQ2P!)%fhK$9h)c��P!r
rr�s&&rr��BBaseStartTLS.test_start_tls_client_corrupted_ssl.<locals>.<lambda>r�rc�x:�UO2oUORP	Q5UOQ2UO]2UO	Q2UO2UO2P![
OcK9h9hSO2SO2h9h)Tr��A
s!please corrupt the SSL connection)�dupr�r�r�rvr2r�r*)r�	orig_sockr�s& �rr��@BaseStartTLS.test_start_tls_client_corrupted_ssl.<locals>.servers�������
�I�
����� $��&����V�$��
�
�a� ����C�D����!��
�
���	�<�<�
��
�����!��
�
��s*�AA<�<B�B�B�B�B�"B9c��: �[OUQRQP-EPiw�K
vqROUO2EPiw�K
Q2UO	Q2RO[O29^tt^2UO2EPiw�K
PPP2UO2Q!K�KxK")%fhK(9h3h)r2r�r��B�OK)	rr�r��readliner6rqr2r�r*)r r�ror�rs&  ��rr#�@BaseStartTLS.test_start_tls_client_corrupted_ssl.<locals>.client$s�����#*�#:�#:��$$�!�$$�!#�$$�$�$�N�F�

���6�?�?�#4�4�4�f�=��L�L����"�"�3�<�<�0�0��o�o�'�'�'�1�
�L�L�N��$�
5�(�1�0�sR�C�C�&C�	C
�
AC�C�!C
�"C�'C�C�C�C	�C	�Cr�r�)	rr�r"r)r*r+r~r r�)rr�r#r2�resr�r�sf    @@r�#test_start_tls_client_corrupted_ssl�0BaseStartTLS.test_start_tls_client_corrupted_ssls�����	�	�'�'�(>�?��4�4�6��"�;�;�=�
�
	�	��_�_�V�)*�%&��(�(�+.��)�)�.�.�v�c�h�h�/?�@�C�	(�	
����d�#�
(�(�s�4,B<�<C	�C	ri�)r�r�r�r�r(r�LONG_TIMEOUTr�r�r�r3rHr�skip_if_tcp_blackholerqr�r�r�r�r�r�r�r�r�r�s@rr�r��s������L��"�"�G�"�-H�^@,�D>,�@�(�(�Y8�)�Y8�v;A�z�(�(�W1�)�W1�r	-�.+�`'�B?�B)$�)$rr�c�(`�\sQsQsnQsQsUsP!)�SelectorStartTLSTests�;c�.�[O2!r
)r�SelectorEventLoopr�s&rr��SelectorStartTLSTests.new_loop>����(�(�*�*rr�r�r�r�r�r�r�r�r�s@rr�r�;s����+�+rr��ProactorEventLoopzWindows onlyc�(`�\sQsQsnQsQsUsP!)�ProactorStartTLSTests�Bc�.�[O2!r
)rrr�s&rr��ProactorStartTLSTests.new_loopFrrrrr�s@rrrBs����+�+rr�__main__)!�__doc__r[r��unittestr.�testr�test.supportrrr2�ImportErrorrrrr�test.test_asynciorr"r�
func_testsr�skipIf�TestCaser�FunctionalTestCaseMixinr�r��
skipUnless�hasattrrr�rrrrr�<module>rs8��$��
����&��������1�6�0�
������o�.�B1�Z�0�0�B1�/�B1�TR	$�:�5�5�R	$�j
������o�.�+�L�(�*;�*;�+�/�+�
������o�.�	���W�W�&9�:�N�K�+�L�(�*;�*;�+�L�/�+��z���M�M�O���}��
�C��s�D'�'D4�-D4�3D4

Youez - 2016 - github.com/yon3zu
LinuXploit