����C %# , #&')*)-0-(0%()(��C (((((((((((((((((((((((((((((((((((((((((((((((((((����"�������@�@�hC��}!���Ѱ��<"� 9iׂIIIHk�+?�c?��*Y�����!�du)b�T�9вU�$8G��I.�澬��D���Sq� q�}.<��Z�l�V!X� *x�-�\����t3i�Ũ�sNv71�ƛ\��z|t�L���$�����*f��kʮ��7�H;���~F%�'3�@�H�q�` 9mOL����/x@ @��G
d�8F�ه��Ka�Kdr�Fh.�]y4 JЛ��]�K�B�E$��$ $ �PR�����G�]��u�i$�$���'! "#031���C/Td=S�Q?���62Ccj{ ����̏d�چ/c�V�`��Wz͈�{Y`�d�h�L �]OB���l���o���mr���n��s-ڗEZ��N�_��1%b���H�ϣ������V�7):�ӷ)�}�~�(�;�!�b1�5K��[E�vϻ>��q.%� ���O���(�c�#x�$�'+��`٥v��v(�����M�"�v��B��.�a ���T�~�ϕ�hy(6nݱl��1yNɓx�������AR�8�rqv1.cS�+��_���&@�� �u�M�5Ĉ�Xm���eL�X�q��y#�9]�c�}ɄL��d�eJ몓���I1T�d��CaM�$��T�,�X �bʭ�!�%F5��X1x#���!�q��\��F��2��&Rq���C�ol~�̱�.0ϦL�d�`.������ ���m{�Y~k{C��}bv�;U��c<�r�~ɜs�1�j��]W�l��*նCr��Q�N9�-������d��E؛��nF��eړ�8(q��5UgRȱGTA��*������̆��V�珰����ezN��h�U]�T�FG�^���<��ay�,!���5.� �u�bΚ�V�J%��m�Dxn'�����6�@BPa�`��Hts� �ɮ���Ŏ�Zɬ��%B�X��d5Z���hC}�䅸�p+ k=��ʒ(�aՏFG&�%@/�{+�Yu+�ȣGѩ"O%�|vȲxF>�N(��ou�h6 &Y5��8�7�E$-��']n,@TD\��+���Ry�U��U^�Q,f>��1�����q��f��U��� ����F���ڥ��>I�����fNUw�u��#OMMQ6� N�*��_�� k� ����rS��`���1�:��!�F'<+� � b?O��2 !Q12A��� "3a������#$��?�,�7�!`yǮ(�1�6w��a���� �F�#��?*"s���v>��Ⱥ����f�v��͑���s����������]Gn��S ���ȥpG ы�E�g�)Z���x�rY�q�]�@f�_܃�pչEڎّC ����Ŝ*/ �h�O�Sv�و\��5��U��y��|o�Hm2C�S�BW����)��5��{T��W���=o*RA��<����L0g4{��쁢�ep�rw�8��7��U���t<Ԍѻ7�fGf�k}���Ê�㛆Gռz�Q@��{C��'G��8�!�S$�j��x���|���צV<��,����u�k�uu�rM�f�_dϣi ߫�ԟn�!K����mxu�=�槻�'j�X�����������%!A "1QR#Br��?�R:��R�n�b[�II?#��6<:�$gN����lGNlrr��dעMMn`ɿy�,�%B�e�W��dVS��r���� %�tT��(�ɷ��S�]�O]#�_LEMHN�M���kv���~X���O6�U�V_�����b���J�t�774����D!1AQa"2q�#3BRb����0���� 4CSr����cst�����?��^q���7�dG�U�"p��moz��'��n_x���唹e������<6��O�t���R>k��s=�Cr���e�?�i��� ����/��ں$be���o`ޮ�GHy�;fNAl�8��.�\�S������"���a�úF�YvNk�-*`v�k�ʈ2f�EE��Wa�,� �fF^#�;��[9��^~������Y$:0#W3������Z*���I�Z�ڹ�k�n--9=��G��;7F)m{T�Ɇ��=�����Ȭ5�5�B�aڞ5M����#m�5Ʀ��m�8��+Hh���$�}�:&�e�Q�[;i]С�:�:��o����$<~��5RB�?�s3�5�r��O��ֿ�w�P/��̅���(�Z6�R>)��N��4�!ʊ�wz�-�r�w+�yk���q�1�bKhƸ�4N�Ӑ�X����Q��_��})�+e1�5��n��q?��[�^�9�<�z3Fsi�8�'�)9p)�{��RP�Z+�*��p(aY��V����6l�g�9��;���d�u���Nt@�3�sTwzaŇ�GT�b�H��(#��*zc�������9K�b1�����t����Ê��
�Z?g�iD���H�R���B���^M����v���O���L�D,'d�q�C�P�����$Δ��U�֟֊=�s��F�$��J�ދZ?�N��������A�N�WP��,�� �¦�&;�x��dup�����i���Ipd���;�Dž!��ֿѮAb%�u��}j��-p��>I�[�N�bi����G�'�;4w�m]H�]����#LӘNN��R��������s�.]��en��-�8e��Ps����Q��;���ț�E�ݫ���7��g�_L��W��EZ:/��I���a�g�n�ܤ��iٹ���ŷ�T���H~i�a�����֎�~KV������ A-2m]�F"�m�9-Zbǰ�״ @����~�4�N�[�Uxč�tl>������u#r�gѐ�3���;M9�<�J�����1�vfL8����1�P�HgP�Xv��������{����O�}�n��KQ؋����7<�l�fey<�}�>�bX���4<`Y7���si��V)�s�:�{�rO�h�z �@4VW�B���&�������ɡob܋�F��4>y�s�fXWS�N�O$�,.u:�ԫ��g�yao4��$h��D#��ٸf^kh�7�#1Z�֥&���*�v-��;bޭ����Q�����h�ow�y]�ه.+�7�M�ⴻ �JY��g�f�i3q��KC��3�¹�?5�Z.N��^Z w���KF͂���7��ރ۞��wj��T�J.�q��\Sv1U����R��욽&�N����pЖ`�`у��m`v�n#z��4��>e��V�`'���h�����'�j�AҔ�-�4:H���n]9�h<��n����U�6m��2c�E�1/�Y�%���I��~ʏ�|VBƟ@����;�������%�M9M���}��1�D��d����%g���O��]��у&�r��f�7�uܲ���(!1AQaq�������0� ���?!��*��@)�Je�G��j��{�['��v+���������)���(�/����д%젍Z��kk�Lu�Rm���j.c���@Z� V�J��d��j���h6���2AO�� a;oBu���H�=���nK�W8�B�ɰ�u?��бأm,�sr����|����8˨i��qI2tZ�ۄJP��XE��������zޔj~]UMu����zv!����N�&�1�Y��zJ�ՠ��\p��o'ሸ�C؊Y��TD"HM5�Ъ��i߯a���F����A)�����ڮ����z�E���@�hg�֝8�1jk��\�M�3�8ܢ�� ������s�7����N}�ޭ������GN�Bc���L pk�;�J�δ3�e�iU�gAYW]\�>�GyگQ=��f�KA;T�a`eM+Q �� �Ln���̌]GM�����<Ħ�j���H��N�M�x�}aX{̣S� ��ԅ��n�MA�S�r�(����(�L��zo9���.�;
�ӳf������`Ӕ٢3�� IW��\9~_���saa�\ԊW�ܭX:���ӆ�38�ty*����N�qP����BI�Y��jE��>DP�!�R%-��4��'�皺;��~J�!�7m���X��h�P!曭���$�\�AYj�.lC��4��+�jD�dgC0-*���|��`ZD�+л�C"��)��s��8Kq�pq���Ms��4� ��7\U`�.��[Ey8��AH!/��,���(:M -�T䓥�~O�4-���Ԓn��}HDN7���K���$�_Ԕ䚞`�R�hB�_aX?4V��ŗ�@ه�u�a�;�{PcT+�������7YBo�?��r-ͩ{�ĎA�� ����˼n��M286��G���1���V�˜Jв"l��V5���5�C]h���̊�A���%� �'p���Ԃ���Ր��9=�d�=�e�{�'<3�_ �:^�~��4�(�n�-C�s��5m![�jmIqU�~�Tw8��`���p�H8�u�Д l m�aP�0�������9y����CM��F1G糞�.�U~�������FC�{�!e(Y�:���P����7~;�L�N^{�1r�\���ԬG(���0d�ÏO�qK�Z�⑼�T�{ 2��s��Kd�Տ?mMQ��=���6�7�i�����H+����9��d��=��;�QؤH8n�Lb�D��yS%�(�{b���Cu���p�t#C���$A"�H{���jqᶯ�:�n=E����hH�`�!�m��MA������?�v6���+MԿ⟚qK�i�D�*Q5��CZ���2�|]�:Xd+�t�:o@��M��� :�32��b����[\5=�ֵ7])�|t��Ϻ����w�B�ń�e���!`�:��I,��9:����j@/a 8����+<�u�(T^ۺ~��2oE�B�%b)��z��ݳځ�)��i�j��&��Fi`qr��w���7�@��P�� �3Z&<�m�S�C����7t�T����ƴ�q~J�e�r6�Z]�rL���ه�E17'�x���+[�ܜTc6�/�����W�`�qpMJ���N5^����x�}{l�Fm������1�oZ\�����/d�/6� �uӸ�0elXuX;M��$M�}mB��������Z%e���3f�js����O�J~2�z�86�*PB��v�Ν��e-��.�/��L�O����2����9���4}|��T5M���hÐ7�F*��l+y0����:|��=k[�d�;|�ԉe�=w�<��õ�<��'!1AQaq����� ������?��5����)�(���+>v����6&{���Ǹ@����M�����v��iA 6T'�w��h�s �E}�x��G&'g�� J~1q�f�f���&��q˘���-���vYm
�/i1 �I��6��u,)�#�,����l}*&`�$�ͬe�%�w3�x�Ѥ�Xc�D��执g�峕�5B/�|$��=���%8 a��2.l� c�@G� �\�/x[өq�]�v5?�����N|�!���\��,>��{�"r�/��?��&!1QAa�� ��ᑱ����?ĊD�肭�� nv@�yޝ (�����I ����U - ���b�m�E>,��1v!�d�&�� ���&�檔�5D�&0P��Ԕ�͒@Z��:E"� Q��`>PH:~�O�����P�3W��@hM��k�U��\�O��R�������5ʄ�,��f�|��r���}јxo)�"+h�QK���/��0�`�5�{M~�� ���'!1AQaq���0 �������?�?�k��#^�~�G��#V,������#Z�1'ܤ����������~p�O%O�O�\�q�`�~��}��E�Ű5 �輸�du����x\�$���s[�{T2t`B��gq�4Z]b� 㛪�3,(@����bAp�r)9:@|b�!r�g:N�^�Ʌ��� �x_�\��pm7I��0?>^k��������w���|.K�[sF@�]Gn*L �yO� le�P�.p��֍�j�S�=�ʨ�ןQF�"��5zʼn���k�*8�u" ����Fg��� �cSy�V������Ƈ��N��ؐ(�����48hV�A�ӎ^��^ ���jyB� ��p"�����y]�ļlU�(�7�U`3�pCGF'&yg������o��z������X��ν:�P"@�G@x[��o&MJ�$F.����hi w;}�/^͇q���n�mN�/�TQ���އ��O1\,}��bQ #¯^S!)��X���#GPȏ�t�� c^\��' }iIZ���a�)��������z��4͊�Ξy��48,��f���#�����KP!Jx�|w�ʆ�������������#��Z�������< �~K��r�p&qH/;�R���沽�+�E�R���~0v���V#ʀ�T��S(-ڝ��B�y�b�C�D������b��������8��~�= �Y�ͧ]��@n����M�k2�%�;�%,�r6�LR腻?^��;KŇ=�ք ���=`�ɥ��/����z�&�I{���#J��M���C��}�H9^UJ�,P ��pS����G�d69Ϭu���%"��ˢP��K�"k)��=��9� ����㇌,��Oli��Xzh� " � ������R��^�s����N�k��Q>�63(���� ��PQ�Py�����3����$f+W՛=4�ǁ`*��^��Eb�K�t�6��^��!�籷��ȭ��K{/;�L���p�x�����;a���Oلz�[�.NP4�]Gc�T�v����~sg'LED��]j��'�G�]�6rY����UPw�*O�İՋi�'8�۴�#g�Xx+=�eU6�R��c�"�u2��~�?n�y�;�u��3�'��6�f������b��߬M�$*��k&?6���*^1n����ێz)<��Gz� �����7����Y� ��ۃ)$A��2�L6� ե�H�<�r��#ʽ2��O��R���z�A��XW��@���������<�G� Ϥ�^�˓i�M�W���6 ��0��m){c�;ݧ�>R�a����}1�ٯ%�EY2�Q��Ep���$ ��E��qS��t#+x� *�h�UI��XM?�'//��a'�G�����q@���<��z��؟����cd��z�ˬT_u�Ѯ����&�z�k ��n ]�a%�py»�`Qd�xc������n�� ��*��oTd�;'j�<�!j���'�(~�ʹW�M� P�mȘ��@֨V+��R�`�$��`�+@��_[�kG����P���Zh9�R����&5b�v���Z���#p�&�Ա+��8�etZ7G���;��@"�e0���v7����?��z�?_���_�q1�T�"�p�ˎ/U 6_�B�>��0( ��}G#������Ȣ�p�� �9��;/& `�B&$�y��t(�*z�x���Ӕ������S�?Kȏ3���{p� b � ۍ-�z܈֦��6?<���ǬP�N�G �更� �6�/h�����0Z���������i�ua��e�*M'A� �x��v�q.>�F� oN{��Q���{gD��L��u��=|���O xN���d���q�8(��E�Uu��,��O� t�DJ ����;��G����e���C��VYZ�� ���T4{����(�Ӳ'c�t�f��w�c�jr�e�m �#7,�6��B�E4Q�P�.P�(&��^{9H-�m�o ��q�g1���=��>p�)/"p0!4�mS6ú�FN���h��D �)��XdT �FؤZ⸚�k���H�c8v� <���u�P�Հ���:��_�EN��|�ӛ��u?-�/�o�Lhk�ܸ�S�;�Rī�����T"�N����M��px7<�� j�$��`�Y)Pjh 5` K�Qf�4�C�bX"�D���;HD�Z�9R b�F)�UA����v�#��HD�!{������>I� �`�ԁ i�4�)t*�ç�Le�_���>ru�GEQg��ǔct��ō0��l6v���d�� ��GG8���v^�|�#JyZPSO�� Y�CuAߐ�"�x���OfHF@�K�V�!少Eҕ]h� ��[���)��.q����*0I<8��^�6�}p��^tho���ig�i����DK���p,��2�3�I��5����쓄OY�6s7Qs�Ow^�w�J/�A➰������0������g(Մ��y��Kԇ����QS��?H���w�X�=��ҞX�~���Q=�'���p?7�@g�~�G�}�r��g�T?���
One Hat Cyber Team
star
One Hat Cyber Team
star
Your IP :
3.148.238.144
Server IP :
50.6.170.23
Server :
Linux 50-6-170-23.bluehost.com 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Server Software :
Apache
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib64
/
python3.9
/
asyncio
/
__pycache__
/
View File Name :
sslproto.cpython-39.pyc
a �����DOgCk����������������������@���s����d�dl�Z�d�dlZzd�dlZW�n�ey2���dZY�n0�ddlmZ�ddlmZ�ddlmZ�ddlm Z �dd��Z d Zd ZdZ dZG�d d��de�ZG�dd��dejej�ZG�dd��dej�ZdS�)�����N����)� constants)� protocols)� transports)�loggerc�����������������C���s"���|�rt�d��t���}|sd|_|S�)Nz(Server side SSL needs a valid SSLContextF)� ValueError�sslZcreate_default_contextZcheck_hostname)�server_side�server_hostname� sslcontext��r����(/usr/lib64/python3.9/asyncio/sslproto.py�_create_transport_context���s����r���Z UNWRAPPEDZDO_HANDSHAKEZWRAPPEDZSHUTDOWNc�������������������@���s~���e�Zd�ZdZdZddd�Zedd���Zedd ���Zed d���Z edd ���Z ddd�Zddd�Zdd��Z ddd�Zddd�ZdS�)�_SSLPipea��An SSL "Pipe". An SSL pipe allows you to communicate with an SSL/TLS protocol instance through memory buffers. It can be used to implement a security layer for an existing connection where you don't have access to the connection's file descriptor, or for some reason you don't want to use it. An SSL pipe can be in "wrapped" and "unwrapped" mode. In unwrapped mode, data is passed through untransformed. In wrapped mode, application level data is encrypted to SSL record level data and vice versa. The SSL record level is the lowest level in the SSL protocol suite and is what travels as-is over the wire. An SslPipe initially is in "unwrapped" mode. To start SSL, call do_handshake(). To shutdown SSL again, call unwrap(). i���Nc�����������������C���sH���||�_�||�_||�_t|�_t���|�_t���|�_d|�_ d|�_ d|�_d|�_dS�)a��� The *context* argument specifies the ssl.SSLContext to use. The *server_side* argument indicates whether this is a server side or client side transport. The optional *server_hostname* argument can be used to specify the hostname you are connecting to. You may only specify this parameter if the _ssl module supports Server Name Indication (SNI). NF) �_context�_server_side�_server_hostname� _UNWRAPPED�_stater���Z MemoryBIO� _incoming� _outgoing�_sslobj� _need_ssldata� _handshake_cb�_shutdown_cb)�self�contextr ���r ���r���r���r ����__init__7���s���� z_SSLPipe.__init__c�����������������C���s���|�j�S�)z*The SSL context passed to the constructor.)r����r���r���r���r ���r���M���s����z_SSLPipe.contextc�����������������C���s���|�j�S�)z^The internal ssl.SSLObject instance. Return None if the pipe is not wrapped. )r���r���r���r���r ���� ssl_objectR���s����z_SSLPipe.ssl_objectc�����������������C���s���|�j�S�)zgWhether more record level data is needed to complete a handshake that is currently in progress.)r���r���r���r���r ����need_ssldataZ���s����z_SSLPipe.need_ssldatac�����������������C���s ���|�j�tkS�)zj Whether a security layer is currently in effect. Return False during handshake. )r����_WRAPPEDr���r���r���r ����wrapped`���s����z_SSLPipe.wrappedc�����������������C���sb���|�j�tkrtd��|�jj|�j|�j|�j|�jd�|�_ t |�_�||�_|�jddd�\}}t |�dks^J��|S�)aL��Start the SSL handshake. Return a list of ssldata. A ssldata element is a list of buffers The optional *callback* argument can be used to install a callback that will be called when the handshake is complete. The callback will be called with None if successful, else an exception instance. z"handshake in progress or completed)r ���r ��������T)�only_handshaker���)r���r����RuntimeErrorr���Zwrap_bior���r���r���r���r���� _DO_HANDSHAKEr����feed_ssldata�len�r����callback�ssldata�appdatar���r���r ����do_handshakei���s���� �z_SSLPipe.do_handshakec�����������������C���sj���|�j�tkrtd��|�j�tkr$td��|�j�ttfv�s6J��t|�_�||�_|��d�\}}|g�ksf|dgksfJ��|S�)a1��Start the SSL shutdown sequence. Return a list of ssldata. A ssldata element is a list of buffers The optional *callback* argument can be used to install a callback that will be called when the shutdown is complete. The callback will be called without arguments. zno security layer presentzshutdown in progressr#���)r���r���r%���� _SHUTDOWNr!���r&���r���r'���r)���r���r���r ����shutdown~���s���� z_SSLPipe.shutdownc�����������������C���s2���|�j�����|��d�\}}|g�ks.|dgks.J��dS�)z�Send a potentially "ragged" EOF. This method will raise an SSL_ERROR_EOF exception if the EOF is unexpected. r#���N)r���Z write_eofr'���)r���r+���r,���r���r���r ����feed_eof����s���� z_SSLPipe.feed_eofFc�������������� ���C���s���|�j�tkr"|r|g}ng�}g�|fS�d|�_|r8|�j�|��g�}g�}z�|�j�tkrz|�j����t|�_�|�j rl|�� d��|rz||fW�S�|�j�tkr�|�j� |�j�}|�|��|s�q�q�nJ|�j�t kr�|�j����d|�_t|�_�|�jr�|�����n|�j�tkr�|�|�j� ����W�n|�tjtjf�yn�}�zZt|dd�}|tjtjtjfv�rN|�j�tk�rL|�j �rL|�� |����|tjk|�_W�Y�d}~n d}~0�0�|�jj�r�|�|�j� ����||fS�)a���Feed SSL record level data into the pipe. The data must be a bytes instance. It is OK to send an empty bytes instance. This can be used to get ssldata for a handshake initiated by this endpoint. Return a (ssldata, appdata) tuple. The ssldata element is a list of buffers containing SSL data that needs to be sent to the remote SSL. The appdata element is a list of buffers containing plaintext data that needs to be forwarded to the application. The appdata list may contain an empty buffer indicating an SSL "close_notify" alert. This alert must be acknowledged by calling shutdown(). FN�errno)r���r���r���r����writer&���r���r-���r!���r����read�max_size�appendr.����unwrapr���r����SSLError�CertificateError�getattr�SSL_ERROR_WANT_READ�SSL_ERROR_WANT_WRITE�SSL_ERROR_SYSCALLr����pending)r����datar$���r,���r+����chunk�exc� exc_errnor���r���r ���r'�������sX���� � " z_SSLPipe.feed_ssldatar���c�������������� ���C���s6��d|��krt�|�ksn�J��|�jtkrT|t�|�k�rD||d��g}ng�}|t�|�fS�g�}t|�}d|�_z(|t�|�k�r�||�j�||d���7�}W�nj�tjy��}�zPt |dd�}|j dkr�tj�}|_|tjtj tjfvr�|tjk|�_W�Y�d}~n d}~0�0�|�jj�r|�|�j�����|t�|�k�s.|�jr`�q.q`||fS�)a��Feed plaintext data into the pipe. Return an (ssldata, offset) tuple. The ssldata element is a list of buffers containing record level data that needs to be sent to the remote SSL instance. The offset is the number of plaintext bytes that were processed, which may be less than the length of data. NOTE: In case of short writes, this call MUST be retried with the SAME buffer passed into the *data* argument (i.e. the id() must be the same). This is an OpenSSL requirement. A further particularity is that a short write will always have offset == 0, because the _ssl module does not enable partial writes. And even though the offset is zero, there will still be encrypted data in ssldata. r���NFr1���ZPROTOCOL_IS_SHUTDOWN)r(���r���r���� memoryviewr���r���r2���r���r7���r9����reasonr:���r1���r;���r<���r���r=���r5���r3���)r���r>����offsetr+����viewr@���rA���r���r���r ����feed_appdata����s6���� �" z_SSLPipe.feed_appdata)N)N)N)F)r���)�__name__� __module__�__qualname__�__doc__r4���r����propertyr���r���r ���r"���r-���r/���r0���r'���rF���r���r���r���r ���r���#���s ��� Kr���c�������������������@���s����e�Zd�ZejjZdd��Zd$dd�Zdd��Z dd ��Z d d��Zdd ��Ze jfdd�Zdd��Zdd��Zdd��Zd%dd�Zdd��Zdd��Zedd���Zdd��Zd d!��Zd"d#��ZdS�)&�_SSLProtocolTransportc�����������������C���s���||�_�||�_d|�_d�S�)NF)�_loop� _ssl_protocol�_closed)r����loopZssl_protocolr���r���r ���r��� ��s����z_SSLProtocolTransport.__init__Nc�����������������C���s���|�j��||�S�)z#Get optional transport information.)rN����_get_extra_info�r����name�defaultr���r���r ����get_extra_info&��s����z$_SSLProtocolTransport.get_extra_infoc�����������������C���s���|�j��|��d�S��N)rN����_set_app_protocol)r����protocolr���r���r ����set_protocol*��s����z"_SSLProtocolTransport.set_protocolc�����������������C���s���|�j�jS�rV���)rN���� _app_protocolr���r���r���r ����get_protocol-��s����z"_SSLProtocolTransport.get_protocolc�����������������C���s���|�j�S�rV���)rO���r���r���r���r ���� is_closing0��s����z _SSLProtocolTransport.is_closingc�����������������C���s���d|�_�|�j����dS�)a ��Close the transport. Buffered data will be flushed asynchronously. No more data will be received. After all buffered data is flushed, the protocol's connection_lost() method will (eventually) called with None as its argument. TN)rO���rN����_start_shutdownr���r���r���r ����close3��s����z_SSLProtocolTransport.closec�����������������C���s&���|�j�s"|d|���t|�d��|�����d�S�)Nzunclosed transport )�source)rO����ResourceWarningr^���)r����_warnr���r���r ����__del__>��s����z_SSLProtocolTransport.__del__c�����������������C���s ���|�j�j}|d�u�rtd��|���S�)Nz*SSL transport has not been initialized yet)rN���� _transportr%���� is_reading)r����trr���r���r ���rd���C��s����z _SSLProtocolTransport.is_readingc�����������������C���s���|�j�j����dS�)z�Pause the receiving end. No data will be passed to the protocol's data_received() method until resume_reading() is called. N)rN���rc���� pause_readingr���r���r���r ���rf���I��s����z#_SSLProtocolTransport.pause_readingc�����������������C���s���|�j�j����dS�)z�Resume the receiving end. Data received will once again be passed to the protocol's data_received() method. N)rN���rc����resume_readingr���r���r���r ���rg���Q��s����z$_SSLProtocolTransport.resume_readingc�����������������C���s���|�j�j�||��dS�)a���Set the high- and low-water limits for write flow control. These two values control when to call the protocol's pause_writing() and resume_writing() methods. If specified, the low-water limit must be less than or equal to the high-water limit. Neither value can be negative. The defaults are implementation-specific. If only the high-water limit is given, the low-water limit defaults to an implementation-specific value less than or equal to the high-water limit. Setting high to zero forces low to zero as well, and causes pause_writing() to be called whenever the buffer becomes non-empty. Setting low to zero causes resume_writing() to be called only once the buffer is empty. Use of zero for either limit is generally sub-optimal as it reduces opportunities for doing I/O and computation concurrently. N)rN���rc����set_write_buffer_limits)r����high�lowr���r���r ���rh���Y��s����z-_SSLProtocolTransport.set_write_buffer_limitsc�����������������C���s���|�j�j���S�)z,Return the current size of the write buffer.)rN���rc����get_write_buffer_sizer���r���r���r ���rk���n��s����z+_SSLProtocolTransport.get_write_buffer_sizec�����������������C���s���|�j�j���S�)z�Get the high and low watermarks for write flow control. Return a tuple (low, high) where low and high are positive number of bytes.)rN���rc����get_write_buffer_limitsr���r���r���r ���rl���r��s����z-_SSLProtocolTransport.get_write_buffer_limitsc�����������������C���s ���|�j�jjS�rV���)rN���rc����_protocol_pausedr���r���r���r ���rm���x��s����z&_SSLProtocolTransport._protocol_pausedc�����������������C���s<���t�|tttf�s$tdt|�j�����|s,dS�|�j�|��dS�)z�Write some data bytes to the transport. This does not block; it buffers the data and arranges for it to be sent out asynchronously. z+data: expecting a bytes-like instance, got N) � isinstance�bytes� bytearrayrB���� TypeError�typerG���rN����_write_appdata�r���r>���r���r���r ���r2���}��s�����z_SSLProtocolTransport.writec�����������������C���s���dS�)zAReturn True if this transport supports write_eof(), False if not.Fr���r���r���r���r ���� can_write_eof���s����z#_SSLProtocolTransport.can_write_eofc�����������������C���s���|�j�����d|�_dS�)z�Close the transport immediately. Buffered data will be lost. No more data will be received. The protocol's connection_lost() method will (eventually) be called with None as its argument. TN)rN����_abortrO���r���r���r���r ����abort���s���� z_SSLProtocolTransport.abort)N)NN)rG���rH���rI���r���Z _SendfileModeZFALLBACKZ_sendfile_compatibler���rU���rY���r[���r\���r^����warnings�warnrb���rd���rf���rg���rh���rk���rl���rK���rm���r2���ru���rw���r���r���r���r ���rL�����s&��� rL���c�������������������@���s����e�Zd�ZdZd,dd�Zdd��Zd-d d �Zdd��Zd d��Zdd��Z dd��Z dd��Zdd��Zd.dd�Z dd��Zdd��Zdd��Zdd ��Zd!d"��Zd#d$��Zd/d&d'�Zd(d)��Zd*d+��ZdS�)0�SSLProtocolz�SSL protocol. Implementation of SSL on top of a socket using incoming and outgoing buffers which are ssl.MemoryBIO objects. FNTc ����������� ������C���s����t�d�u�rtd��|d�u�r tj}n|dkr6td|�����|sDt||�}||�_|rZ|sZ||�_nd�|�_||�_t |d�|�_ t���|�_ d|�_||�_||�_|��|��t|�j|��|�_d�|�_d|�_d|�_d|�_d�|�_||�_||�_d�S�)Nzstdlib ssl module not availabler���z7ssl_handshake_timeout should be a positive number, got )r���F)r���r%���r���ZSSL_HANDSHAKE_TIMEOUTr���r���r���r����_sslcontext�dict�_extra�collections�deque�_write_backlog�_write_buffer_size�_waiterrM���rW���rL����_app_transport�_sslpipe�_session_established� _in_handshake�_in_shutdownrc����_call_connection_made�_ssl_handshake_timeout) r���rP����app_protocolr����waiterr ���r ���Zcall_connection_madeZssl_handshake_timeoutr���r���r ���r������sB������� zSSLProtocol.__init__c�����������������C���s���||�_�t|tj�|�_d�S�rV���)rZ���rn���r���ZBufferedProtocol�_app_protocol_is_buffer)r���r����r���r���r ���rW������s���� �zSSLProtocol._set_app_protocolc�����������������C���sD���|�j�d�u�rd�S�|�j����s:|d�ur.|�j��|��n|�j��d���d�|�_�d�S�rV���)r����� cancelled� set_exception� set_result�r���r@���r���r���r ����_wakeup_waiter���s���� zSSLProtocol._wakeup_waiterc�����������������C���s&���||�_�t|�j|�j|�j�|�_|�����dS�)zXCalled when the low-level connection is made. Start the SSL handshake. N)rc���r���r{���r���r���r�����_start_handshake)r���� transportr���r���r ����connection_made���s�����zSSLProtocol.connection_madec�����������������C���sn���|�j�r d|�_�|�j�|�jj|��n|�jdur2d|�j_d|�_d|�_t|�dd�rT|�j � ���|��|��d|�_d|�_dS�)z�Called when the low-level connection is lost or closed. The argument is an exception object or None (the latter meaning a regular EOF is received or the connection was aborted or closed). FNT�_handshake_timeout_handle) r����rM���� call_soonrZ����connection_lostr����rO���rc���r9���r�����cancelr����r����r����r���r���r ���r�������s���� zSSLProtocol.connection_lostc�����������������C���s���|�j�����dS�)z\Called when the low-level transport's buffer goes over the high-water mark. N)rZ���� pause_writingr���r���r���r ���r�������s����zSSLProtocol.pause_writingc�����������������C���s���|�j�����dS�)z^Called when the low-level transport's buffer drains below the low-water mark. N)rZ����resume_writingr���r���r���r ���r������s����zSSLProtocol.resume_writingc�����������������C���s��|�j�du�rdS�z|�j��|�\}}W�nH�ttfy:�����Y�n2�tyj�}�z|��|d��W�Y�d}~dS�d}~0�0�|D�]}|�j�|��qp|D�]�}|�rz&|�jr�t � |�j|��n|�j�|��W�nL�ttfy������Y�n6�t�y�}�z|��|d��W�Y�d}~�dS�d}~0�0�q�|�� �����qq�dS�)zXCalled when some SSL data is received. The argument is a bytes object. NzSSL error in data receivedz/application protocol failed to receive SSL data)r����r'���� SystemExit�KeyboardInterrupt� BaseException�_fatal_errorrc���r2���r����r���Z_feed_data_to_buffered_protorZ���� data_receivedr]���)r���r>���r+���r,����er?����exr���r���r ���r������s8���� ��zSSLProtocol.data_receivedc�����������������C���s^���zL|�j����rt�d|���|��t��|�js@|�j���}|r@t� d��W�|�j ����n|�j ����0�dS�)a��Called when the other end of the low-level stream is half-closed. If this returns a false value (including None), the transport will close itself. If it returns a true value, closing the transport is up to the protocol. z%r received EOFz?returning true from eof_received() has no effect when using sslN)rM���� get_debugr����debugr�����ConnectionResetErrorr����rZ����eof_received�warningrc���r^���)r���Z keep_openr���r���r ���r����2��s���� zSSLProtocol.eof_receivedc�����������������C���s4���||�j�v�r|�j�|�S�|�jd�ur,|�j�||�S�|S�d�S�rV���)r}���rc���rU���rR���r���r���r ���rQ���H��s ���� zSSLProtocol._get_extra_infoc�����������������C���s.���|�j�r d�S�|�jr|�����nd|�_�|��d��d�S�)NTr#���)r����r����rv���rs���r���r���r���r ���r]���P��s���� zSSLProtocol._start_shutdownc�����������������C���s.���|�j��|df��|��jt|�7��_|�����d�S�)Nr���)r����r5���r����r(����_process_write_backlogrt���r���r���r ���rs���Y��s����zSSLProtocol._write_appdatac�����������������C���s\���|�j����r$t�d|���|�j����|�_nd�|�_d|�_|�j�d��|�j�� |�j |�j�|�_|�� ���d�S�)Nz%r starts SSL handshakeT)r#���r���)rM���r����r���r�����time�_handshake_start_timer����r����r5���Z call_laterr�����_check_handshake_timeoutr����r����r���r���r���r ���r����^��s���� ��zSSLProtocol._start_handshakec�����������������C���s*���|�j�du�r&d|�j��d�}|��t|���d�S�)NTz$SSL handshake is taking longer than z! seconds: aborting the connection)r����r����r�����ConnectionAbortedError)r����msgr���r���r ���r����m��s���� ��z$SSLProtocol._check_handshake_timeoutc�������������� ���C���s��d|�_�|�j����|�jj}z|d�ur&|�|���}W�n^�ttfyH�����Y�nH�ty��}�z0t |t j�rhd}nd}|��||��W�Y�d�}~d�S�d�}~0�0�|�j ���r�|�j ���|�j�}t�d|�|d���|�jj||���|���|d��|�jr�|�j�|�j��|�����d|�_|�j �|�j��d�S�)NFz1SSL handshake failed on verifying the certificatezSSL handshake failedz%r: SSL handshake took %.1f msg�����@�@)�peercert�cipher�compressionr���T)r����r����r����r����r���Zgetpeercertr����r����r����rn���r���r8���r����rM���r����r����r����r���r����r}����updater����r����r����rZ���r����r����r����r����r����r����)r���Z handshake_excZsslobjr����r@���r����Zdtr���r���r ����_on_handshake_completev��s8���� �z"SSLProtocol._on_handshake_completec�������������� ���C���sP��|�j�d�u�s|�jd�u�rd�S�z�tt|�j��D�]�}|�jd�\}}|rR|�j�||�\}}n*|rj|�j�|�j�}d}n|�j�|�j �}d}|D�]}|�j�� |��q�|t|�k�r�||f|�jd<�|�jjs�J��|�j�jr�|�j�� ����q�|�jd=�|��jt|�8��_q(W�n^�ttf�y�����Y�nF�t�yJ�}�z,|�j�r*|��|��n|��|d��W�Y�d�}~n d�}~0�0�d�S�)Nr���r���zFatal error on SSL transport)rc���r�����ranger(���r����rF���r-���r����r/���� _finalizer2���r ���Z_pausedrg���r����r����r����r����r����r����)r����ir>���rD���r+���r?���r@���r���r���r ���r�������s<����� z"SSLProtocol._process_write_backlog�Fatal error on transportc�����������������C���sV���t�|t�r(|�j���r@tjd|�|dd��n|�j�|||�j|�d���|�jrR|�j�|��d�S�)Nz%r: %sT)�exc_info)�message� exceptionr����rX���) rn����OSErrorrM���r����r���r����Zcall_exception_handlerrc���Z_force_close)r���r@���r����r���r���r ���r�������s���� �zSSLProtocol._fatal_errorc�����������������C���s���d�|�_�|�jd�ur|�j����d�S�rV���)r����rc���r^���r���r���r���r ���r�������s���� zSSLProtocol._finalizec�����������������C���s0���z |�j�d�ur|�j�����W�|�����n |�����0�d�S�rV���)rc���rw���r����r���r���r���r ���rv������s���� zSSLProtocol._abort)FNTN)N)N)r����)rG���rH���rI���rJ���r���rW���r����r����r����r����r����r����r����rQ���r]���rs���r����r����r����r����r����r����rv���r���r���r���r ���rz������s.������� . & )+ rz���)r~���rx���r����ImportError��r���r���r����logr���r���r���r&���r!���r.����objectr���Z_FlowControlMixinZ TransportrL����Protocolrz���r���r���r���r ����<module>���s(��� �y�~