AlkantarClanX12

Your IP : 18.223.206.84


Current Path : /proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/ssl.cpython-311.opt-2.pyc

�

c��f!��
��	ddlZddlZddlmZddlmZmZm	Z
ddlmZddlZddlm
Z
mZmZddlmZmZmZddlmZmZmZmZmZmZmZddlmZmZdd	lmZmZm Z m!Z!	dd
lm"Z"n#e#$rYnwxYwddlm$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-ddlm.Z.m/Z/ej0d
e1d�e���e
j0de1d�e���ej0de1d�e���ej0de1d�e���e
j0de1d�e���ej0de1d�e���e2j3xZ4e2_4d�e2j5�6��D��Z7e8e2dd��Z9ee��Gd�d����Z:ee��Gd�d����Z;ee��Gd �d!����Z<ee��Gd"�d#����Z=ej>d$krdd%lm?Z?m@Z@dd&lAmAZAmBZBmCZCdd'lAmDZDmEZEmFZFddlAZGddlHZHddlIZIddlJZJeKZLd(gZMeNed)��ZOe.ZPeZQd*�ZRd+�ZSd,�ZTd-�ZUed.d/��ZVd0�ZWGd1�d2ed2d3����ZXGd4�d5eXe��ZYGd6�d7e��ZZeYj[fdddd8�d9�Z\dKe]d:eYj[dddddd;�d<�Z^e\Z_e^Z`Gd=�d>��Zad?�ZbGd@�dAeA��ZceceZ_deaeZ_eddd:e]e3ddBdBdf	dC�ZfdD�ZgdEZhdFZidG�ZjdH�ZkeldeFfdI�ZmdJ�ZndS)L�N)�
namedtuple)�Enum�IntEnum�IntFlag)�_simple_enum)�OPENSSL_VERSION_NUMBER�OPENSSL_VERSION_INFO�OPENSSL_VERSION)�_SSLContext�	MemoryBIO�
SSLSession)�SSLError�SSLZeroReturnError�SSLWantReadError�SSLWantWriteError�SSLSyscallError�SSLEOFError�SSLCertVerificationError)�txt2obj�nid2obj)�RAND_status�RAND_add�
RAND_bytes�RAND_pseudo_bytes)�RAND_egd)
�HAS_SNI�HAS_ECDH�HAS_NPN�HAS_ALPN�	HAS_SSLv2�	HAS_SSLv3�	HAS_TLSv1�HAS_TLSv1_1�HAS_TLSv1_2�HAS_TLSv1_3)�_DEFAULT_CIPHERS�_OPENSSL_API_VERSION�
_SSLMethodc�8�|�d��o|dkS)N�	PROTOCOL_�PROTOCOL_SSLv23��
startswith��names �*/opt/alt/python311/lib64/python3.11/ssl.py�<lambda>r1}s������-�-�K�$�:K�2K��)�source�Optionsc�,�|�d��S)N�OP_r,r.s r0r1r1�s������'�'�r2�AlertDescriptionc�,�|�d��S)N�ALERT_DESCRIPTION_r,r.s r0r1r1�s�����!5�6�6�r2�SSLErrorNumberc�,�|�d��S)N�
SSL_ERROR_r,r.s r0r1r1�s������.�.�r2�VerifyFlagsc�,�|�d��S)N�VERIFY_r,r.s r0r1r1�s������+�+�r2�
VerifyModec�,�|�d��S)N�CERT_r,r.s r0r1r1�s������)�)�r2c��i|]\}}||��	S�rD)�.0r/�values   r0�
<dictcomp>rG�s��Q�Q�Q�;�4��5�$�Q�Q�Qr2�PROTOCOL_SSLv2c�p�eZdZejZejZejZ	ej
ZejZ
ejZejZdS)�
TLSVersionN)�__name__�
__module__�__qualname__�_ssl�PROTO_MINIMUM_SUPPORTED�MINIMUM_SUPPORTED�PROTO_SSLv3�SSLv3�PROTO_TLSv1�TLSv1�
PROTO_TLSv1_1�TLSv1_1�
PROTO_TLSv1_2�TLSv1_2�
PROTO_TLSv1_3�TLSv1_3�PROTO_MAXIMUM_SUPPORTED�MAXIMUM_SUPPORTEDrDr2r0rJrJ�sJ�������4����E���E�� �G�� �G�� �G��4���r2rJc�(�eZdZ	dZdZdZdZdZdZdS)�_TLSContentType������N)	rKrLrM�CHANGE_CIPHER_SPEC�ALERT�	HANDSHAKE�APPLICATION_DATA�HEADER�INNER_CONTENT_TYPErDr2r0r^r^�s8����������E��I���
�F����r2r^c��eZdZ	dZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#S)$�
_TLSAlertTyper�
r_r`ra��(�)�*�+�,�-�.�/�0�1�2�3�<�F�G�P�V�Z�d�m�n�o�p�q�r�s�t�xN)%rKrLrM�CLOSE_NOTIFY�UNEXPECTED_MESSAGE�BAD_RECORD_MAC�DECRYPTION_FAILED�RECORD_OVERFLOW�DECOMPRESSION_FAILURE�HANDSHAKE_FAILURE�NO_CERTIFICATE�BAD_CERTIFICATE�UNSUPPORTED_CERTIFICATE�CERTIFICATE_REVOKED�CERTIFICATE_EXPIRED�CERTIFICATE_UNKNOWN�ILLEGAL_PARAMETER�
UNKNOWN_CA�
ACCESS_DENIED�DECODE_ERROR�
DECRYPT_ERROR�EXPORT_RESTRICTION�PROTOCOL_VERSION�INSUFFICIENT_SECURITY�INTERNAL_ERROR�INAPPROPRIATE_FALLBACK�
USER_CANCELED�NO_RENEGOTIATION�MISSING_EXTENSION�UNSUPPORTED_EXTENSION�CERTIFICATE_UNOBTAINABLE�UNRECOGNIZED_NAME�BAD_CERTIFICATE_STATUS_RESPONSE�BAD_CERTIFICATE_HASH_VALUE�UNKNOWN_PSK_IDENTITY�CERTIFICATE_REQUIRED�NO_APPLICATION_PROTOCOLrDr2r0rlrl�s���������L����N����O������N��O� �����������J��M��L��M��������N����M�������"����&)�#�!$������!���r2rlc�h�eZdZ	dZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdS)�_TLSMessageTyper����������
���r_r`rarb��C�rdN)rKrLrM�
HELLO_REQUEST�CLIENT_HELLO�SERVER_HELLO�HELLO_VERIFY_REQUEST�NEWSESSION_TICKET�END_OF_EARLY_DATA�HELLO_RETRY_REQUEST�ENCRYPTED_EXTENSIONS�CERTIFICATE�SERVER_KEY_EXCHANGE�CERTIFICATE_REQUEST�SERVER_DONE�CERTIFICATE_VERIFY�CLIENT_KEY_EXCHANGE�FINISHED�CERTIFICATE_URL�CERTIFICATE_STATUS�SUPPLEMENTAL_DATA�
KEY_UPDATE�
NEXT_PROTO�MESSAGE_HASHrerDr2r0r�r��s���������M��L��L������������K������K������H��O������J��J��L����r2r��win32)�enum_certificates�	enum_crls)�socket�SOCK_STREAM�create_connection)�
SOL_SOCKET�SO_TYPE�_GLOBAL_DEFAULT_TIMEOUT�
tls-unique�HOSTFLAG_NEVER_CHECK_SUBJECTc��	|sdS|�d��}|s*|���|���kS|dkr"td�|�����|�d��\}}}d|vr"td�|�����|s"td�|�����|dkr"td�|�����|�d��\}}}|r|sdS|���|���kS)	NF�*r�z1too many wildcards in certificate DNS name: {!r}.�.z9wildcard can only be present in the leftmost label: {!r}.z>sole wildcard without additional labels are not support: {!r}.z<partial wildcards in leftmost label are not supported: {!r}.)�count�lower�CertificateError�format�	partition)�dn�hostname�	wildcards�dn_leftmost�sep�dn_remainder�hostname_leftmost�hostname_remainders        r0�_dnsname_matchr�sq������u�����
�
�I��.��x�x�z�z�X�^�^�-�-�-�-��1�}�}��?�F�F�r�J�J�L�L�	L�&(�\�\�#�%6�%6�"�K��l�
�l����
��F�2�J�J� � �	 �� ��
��F�2�J�J� � �	 ��c����
��F�2�J�J� � �	 �2:�1C�1C�C�1H�1H�.��s�.���C���u������#5�#;�#;�#=�#=�=�=r2c��		tj|��}tj|��|kr|Std�|�����#t
$rYnwxYw	tjtj|��S#t
$r#td�|�����t$rYnwxYwtd�|�����)Nz'{!r} is not a quad-dotted IPv4 address.z+{!r} is neither an IPv4 nor an IP6 address.z{!r} is not an IPv4 address.)	�_socket�	inet_aton�	inet_ntoa�
ValueErrorr��OSError�	inet_pton�AF_INET6�AttributeError)�ipname�addrs  r0�_inet_patonr�Is���
�� ��(�(��
��T�"�"�f�,�,��K��9�@�@��H�H���
���
�
�
���
����
�� ��!1�6�:�:�:���4�4�4��$�$*�F�6�N�N�4�4�	4��
�
�
���
�����3�:�:�6�B�B�
C�
C�Cs#�A�
A �A �$B�5B;�:B;c�R�	t|�����}||kS�N)r��rstrip)�cert_ipaddress�host_ip�ips   r0�_ipaddress_matchrls,���
�^�*�*�,�,�	-�	-�B�
��=�r2c�`�	tjdtd���|std���	t	|��}n#t$rd}YnwxYwg}|�dd��}|D]f\}}|dkr+|�t
||��rdS|�|���6|dkr*|�t||��rdS|�|���g|sP|�d	d��D]9}|D]4\}}|d
kr)t
||��rdS|�|���5�:t|��dkr;td|�d
d�tt|���������t|��dkrtd|�d|d�����td���)Nz"ssl.match_hostname() is deprecatedr���category�
stacklevelztempty or no certificate, match_hostname needs a SSL socket or SSL context with either CERT_OPTIONAL or CERT_REQUIRED�subjectAltNamerD�DNSz
IP Address�subject�
commonNamer�z	hostname z doesn't match either of z, z doesn't match rz=no appropriate commonName or subjectAltName fields were found)�warnings�warn�DeprecationWarningr�r��getr��appendr�lenr��join�map�repr)�certr�r�dnsnames�san�keyrF�subs        r0�match_hostnamerxsC���
�M�,�#������
�;��:�;�;�	;���h�'�'�����������������H�
�(�(�#�R�
(�
(�C��#�#�
��U��%�<�<���>�%��#B�#B������O�O�E�"�"�"�"�
�L�
 �
 ��"�'7��w�'G�'G�"�����O�O�E�"�"�"���
+��8�8�I�r�*�*�	+�	+�C�!�
+�
+�
��U��,�&�&�%�e�X�6�6�������O�O�E�*�*�*��

+��8�}�}�q������x�x����3�t�X�#6�#6�7�7�7� 9�:�:�	:�

�X���!�	�	����x�x��!��� &�'�'�	'�� /�0�0�	0s�A�A�A�DefaultVerifyPathszQcafile capath openssl_cafile_env openssl_cafile openssl_capath_env openssl_capathc�z�	tj��}tj�|d|d��}tj�|d|d��}ttj�|��r|ndtj�|��r|ndg|�R�S)Nrr�r�r�)	rN�get_default_verify_paths�os�environrr�path�isfile�isdir)�parts�cafile�capaths   r0rr�s�����)�+�+�E��Z�^�^�E�!�H�e�A�h�
/�
/�F�
�Z�^�^�E�!�H�e�A�h�
/�
/�F������v�(>�(>�H�f�f�D�(*��
�
�f�(=�(=�G�f�f�4�&�$�&�&�&�&r2c�X��eZdZ	dZ�fd�Ze�fd���Ze�fd���Z�xZS)�_ASN1ObjectrDc�V��t��j|gt|d����R�S)NFr.��super�__new__�_txt2obj)�cls�oid�	__class__s  �r0r*z_ASN1Object.__new__�s.����u�w�w��s�?�X�c��%>�%>�%>�?�?�?�?r2c�T��	t��j|gt|���R�Sr�)r)r*�_nid2obj)r,�nidr.s  �r0�fromnidz_ASN1Object.fromnid�s,���	��u�w�w��s�3�X�c�]�]�3�3�3�3r2c�X��	t��j|gt|d����R�S)NTr.r()r,r/r.s  �r0�fromnamez_ASN1Object.fromname�s3���	��u�w�w��s�?�X�d��%>�%>�%>�?�?�?�?r2)	rKrLrM�	__slots__r*�classmethodr2r4�
__classcell__�r.s@r0r&r&�s����������I�@�@�@�@�@��4�4�4�4��[�4�
�@�@�@�@��[�@�@�@�@�@r2r&znid shortname longname oidc��eZdZ	dZdZdS)�Purposez1.3.6.1.5.5.7.3.1z1.3.6.1.5.5.7.3.2N)rKrLrM�SERVER_AUTH�CLIENT_AUTHrDr2r0r:r:�s�������%�K�%�K�K�Kr2r:c���eZdZ	dZdZdZd d�Zd�Z				d!d�Z		d"d�Z	d	�Z
d
�Zd�Zd�Z
ejfd
�Zeed��r>e�fd���Zej�fd���Ze�fd���Zej�fd���Ze�fd���Zej�fd���Zeed��red���Zejd���Zned���Ze�fd���Zej�fd���Ze�fd���Ze�fd���Zej�fd���Ze�fd���Zej�fd���Z�xZS)#�
SSLContext)�CA�ROOTNc�z�|�#tjdtd���t}t	j||��}|S)Nz9ssl.SSLContext() without protocol argument is deprecated.r�r)rrr
�PROTOCOL_TLSrr*)r,�protocol�args�kwargs�selfs     r0r*zSSLContext.__new__�sH�����M�K�+��
�
�
�
�
$�H��"�3��1�1���r2c��|�dSt|t��r(|�d���d��S|�d��S)N�idna�ascii)�
isinstance�str�encode�decode)rFr�s  r0�_encode_hostnamezSSLContext._encode_hostname�sQ�����4�
��#�
&�
&�	,��?�?�6�*�*�1�1�'�:�:�:��?�?�7�+�+�+r2FTc	�D�|j�|||||||���S)N)�sock�server_side�do_handshake_on_connect�suppress_ragged_eofs�server_hostname�context�session)�sslsocket_class�_create)rFrPrQrRrSrTrVs       r0�wrap_socketzSSLContext.wrap_socket�s9���#�+�+��#�$;�!5�+���,�
�
�	
r2c�h�|j�||||�|��||���S)N)rQrTrVrU)�sslobject_classrXrN)rF�incoming�outgoingrQrTrVs      r0�wrap_biozSSLContext.wrap_biosA���#�+�+��h�K� �1�1�/�B�B��T�,�
�
�	
r2c��tjdtd���t��}|D]~}t	|d��}t|��dkst|��dkrt
d���|�t|����|�|���|�	|��dS)N�'ssl NPN is deprecated, use ALPN insteadr��rrIr�z(NPN protocols must be 1 to 255 in length)
rrr
�	bytearray�bytesrrr�extend�_set_npn_protocols)rF�
npn_protocols�protosrC�bs     r0�set_npn_protocolszSSLContext.set_npn_protocolss����
�5���	
�	
�	
�	
�
����%�	�	�H��h��(�(�A��1�v�v��{�{�c�!�f�f�s�l�l��I�J�J�J��M�M�#�a�&�&�!�!�!��M�M�!���������'�'�'�'�'r2c�v�����	d�_dSt���std�����fd�}|�_dS)Nznot a callable objectc�H����|��}�|||��Sr�)rN)�sslobj�
servername�sslctxrF�server_name_callbacks   ��r0�shim_cbz3SSLContext.set_servername_callback.<locals>.shim_cb0s+���!�2�2�:�>�>�
�+�+�F�J��G�G�Gr2)�sni_callback�callable�	TypeError)rFrprqs`` r0�set_servername_callbackz"SSLContext.set_servername_callback)sl�����'� $�D�����0�1�1�
9�� 7�8�8�8�
H�
H�
H�
H�
H�
H�!(�D���r2c�N�t��}|D]~}t|d��}t|��dkst|��dkrtd���|�t|����|�|���|�|��dS)NrIrrbz)ALPN protocols must be 1 to 255 in length)rcrdrrrre�_set_alpn_protocols)rF�alpn_protocolsrhrCris     r0�set_alpn_protocolszSSLContext.set_alpn_protocols6s�������&�	�	�H��h��(�(�A��1�v�v��{�{�c�!�f�f�s�l�l��J�K�K�K��M�M�#�a�&�&�!�!�!��M�M�!������ � ��(�(�(�(�(r2c��t��}	t|��D].\}}}|dkr"|dus	|j|vr|�|���/n$#t$rtjd��YnwxYw|r|�|���|S)N�x509_asnTz-unable to enumerate Windows certificate store)�cadata)rcr�r-re�PermissionErrorrr�load_verify_locations)rF�	storename�purpose�certsr�encoding�trusts       r0�_load_windows_store_certsz$SSLContext._load_windows_store_certsAs�������	K�):�9�)E�)E�
+�
+�%��h���z�)�)���}�}���u�(<�(<����T�*�*�*��	
+��
�	K�	K�	K��M�I�J�J�J�J�J�	K�����	5��&�&�e�&�4�4�4��s�>A�A0�/A0c���t|t��st|���tjdkr |jD]}|�||���|���dS)Nr�)rJr&rt�sys�platform�_windows_cert_storesr��set_default_verify_paths)rFr�rs   r0�load_default_certszSSLContext.load_default_certsOst���'�;�/�/�	%��G�$�$�$��<�7�"�"�!�6�
C�
C�	��.�.�y�'�B�B�B�B��%�%�'�'�'�'�'r2�minimum_versionc�D��tt��j��Sr�)rJr)r��rFr.s �r0r�zSSLContext.minimum_versionX�����e�g�g�5�6�6�6r2c����|tjkr|xjtjzc_ttt��j�||��dSr�)	rJrR�optionsr4�OP_NO_SSLv3r)r>r��__set__�rFrFr.s  �r0r�zSSLContext.minimum_version\sP����
�(�(�(�����!4� 4�4����*�j�)�)�9�A�A�$��N�N�N�N�Nr2c�D��tt��j��Sr�)rJr)�maximum_versionr�s �r0r�zSSLContext.maximum_versionbr�r2c�n��ttt��j�||��dSr�)r)r>r�r�r�s  �r0r�zSSLContext.maximum_versionfs,����*�j�)�)�9�A�A�$��N�N�N�N�Nr2c�D��tt��j��Sr�)r4r)r�r�s �r0r�zSSLContext.optionsjs����u�w�w��'�'�'r2c�n��ttt��j�||��dSr�)r)r>r�r�r�s  �r0r�zSSLContext.optionsns,���
�j�*�%�%�-�5�5�d�E�B�B�B�B�Br2r�c�J�|jtjz}|tjkSr���_host_flagsrNr�)rF�ncss  r0�hostname_checks_common_namez&SSLContext.hostname_checks_common_namess ���"�T�%F�F�C��$�;�;�;r2c�x�|r|xjtjzc_dS|xjtjzc_dSr�r�)rFrFs  r0r�z&SSLContext.hostname_checks_common_namexsH���
F�� � �T�%F�$F�F� � � � �� � �D�$E�E� � � � r2c��dS�NTrD�rFs r0r�z&SSLContext.hostname_checks_common_names���4r2c�B��	t��j}|�|jSdSr�)r)�
_msg_callback�
user_function)rF�innerr.s  �r0r�zSSLContext._msg_callback�s*���	�>���%�����&�&��4r2c�:�����5ttt��j�|d��dSt	�d��st��d�����fd�}�|_ttt��j�||��dS)N�__call__z is not callable.c�P��	t|��}n#t$rYnwxYw	t|��}n#t$rYnwxYw|tjkrt}n|tjkrt
}nt}	||��}n#t$rYnwxYw�||||||��Sr�)rJr�r^rirfrlr�)�conn�	direction�version�content_type�msg_type�data�msg_enum�callbacks       �r0r�z'SSLContext._msg_callback.<locals>.inner�s����
�$�W�-�-�����
�
�
���
����
�.�|�<�<�����
�
�
���
������5�5�5�*�����!6�6�6�(���*��
�#�8�H�-�-�����
�
�
���
�����8�D�)�W�(�(�D�:�:�
:s-��
 � �4�
A�A�<B�
B�B)r)r>r�r��hasattrrtr�)rFr�r�r.s ` �r0r�zSSLContext._msg_callback�s��������*�j�)�)�7�?�?��d�K�K�K��F��x��,�,�	<��x�:�:�:�;�;�;�	:�	:�	:�	:�	:�2'���
�j�*�%�%�3�;�;�D�%�H�H�H�H�Hr2c�D��tt��j��Sr�)r(r)rCr�s �r0rCzSSLContext.protocol�s����%�'�'�*�+�+�+r2c�D��tt��j��Sr�)r=r)�verify_flagsr�s �r0r�zSSLContext.verify_flags�s����5�7�7�/�0�0�0r2c�n��ttt��j�||��dSr�)r)r>r�r�r�s  �r0r�zSSLContext.verify_flags�s,���
�j�*�%�%�2�:�:�4��G�G�G�G�Gr2c�n��t��j}	t|��S#t$r|cYSwxYwr�)r)�verify_moder@r�r�s  �r0r�zSSLContext.verify_mode�sF������#��	��e�$�$�$���	�	�	��L�L�L�	���s�%�4�4c�n��ttt��j�||��dSr�)r)r>r�r�r�s  �r0r�zSSLContext.verify_mode�s,���
�j�*�%�%�1�9�9�$��F�F�F�F�Fr2r�)FTTNN)FNN)rKrLrMr�rWr[r*rNrYr^rjruryr�r:r;r�r�r�propertyr��setterr�r�rNr�r�rCr�r�r7r8s@r0r>r>�s��������>�)���O��O�	�	�	�	�,�,�,�-2�,0�)-�26�
�
�
�
� 8=�/3�
�
�
�
�(�(�(� (�(�(�	)�	)�	)����*1�)<�(�(�(�(��w�{�-�.�.�O�	�	7�	7�	7�	7�
��	7�
�	�	O�	O�	O�	O�
 �	�	O�

�	7�	7�	7�	7�
��	7�
�	�	O�	O�	O�	O�
 �	�	O��(�(�(�(��X�(�
�^�C�C�C�C��^�C��w�t�3�4�4��	�	<�	<�
��	<�
%�	+�	F�	F�
,�	+�	F�	F�
�	�	�
��	��$�$�$�$��X�$�L��#I�#I�#I�#I���#I�J�,�,�,�,��X�,��1�1�1�1��X�1���H�H�H�H���H�������X����G�G�G�G���G�G�G�G�Gr2r>)r#r$r|c�@�	t|t��st|���|tjkr(tt��}t|_d|_	n4|tj
krtt��}nt|���|s|s|r|�
|||��n%|jtkr|�|��t!|d��r9t"j�d��}|rt(jjs||_|S)NT�keylog_filename�
SSLKEYLOGFILE)rJr&rtr:r;r>�PROTOCOL_TLS_CLIENT�
CERT_REQUIREDr��check_hostnamer<�PROTOCOL_TLS_SERVERr�r~�	CERT_NONEr�r�rrrr��flags�ignore_environmentr�)r�r#r$r|rU�
keylogfiles      r0�create_default_contextr��s"����g�{�+�+�!��� � � �
�'�%�%�%��0�1�1��+���!%����	�G�'�	'�	'��0�1�1�����!�!�!�
�,��,�6�,��%�%�f�f�f�=�=�=�=�	�	�	�	)�	)�	�"�"�7�+�+�+��w�)�*�*�1��Z�^�^�O�4�4�
��	1�c�i�:�	1�&0�G�#��Nr2F)�	cert_reqsr�r��certfile�keyfiler#r$r|c��	t|t��st|���|tjkr
|�t
}n)|tjkr
|�t}nt|���t|��}	||	_
|�||	_|rd|	_
|r|std���|s|r|	�||��|s|s|r|	�
|||��n%|	jtkr|	�|��t!|	d��r9t"j�d��}
|
rt(jjs|
|	_|	S)NT�certfile must be specifiedr�r�)rJr&rtr:r;r�r<r�r�r>r�r��load_cert_chainr~r�r�r�rrrr�r�r�r�)rCr�r�r�r�r�r#r$r|rUr�s           r0�_create_unverified_contextr�s�����g�{�+�+�!��� � � �
�'�%�%�%���*�H��	�G�'�	'�	'���*�H����!�!�!���"�"�G�+�G����'����&�!%����7�x�7��5�6�6�6��3�7�3�����'�2�2�2��,��,�6�,��%�%�f�f�f�=�=�=�=�	�	�	�	)�	)�	�"�"�7�+�+�+��w�)�*�*�1��Z�^�^�O�4�4�
��	1�c�i�:�	1�&0�G�#��Nr2c�:�eZdZ	d�Ze		dd���Zed���Zejd���Zed���Z	e	jd���Z	ed	���Z
ed
���Zed���Zdd
�Z
d�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�ZdS) �	SSLObjectc�:�t|jj�d����)NzU does not have a public constructor. Instances are returned by SSLContext.wrap_bio().�rtr.rK�rFrDrEs   r0�__init__zSSLObject.__init__\s.����~�&�
M�
M�
M�
�
�	
r2FNc�t�|�|��}|�||||||���}||_|S)N)rQrT�ownerrV)r*�	_wrap_bio�_sslobj)	r,r\r]rQrTrVrUrFrms	         r0rXzSSLObject._createbsL���{�{�3�����"�"��h�K�+���#�
�
��
����r2c��	|jjSr��r�rUr�s r0rUzSSLObject.contextns��6��|�#�#r2c��||j_dSr�r��rF�ctxs  r0rUzSSLObject.contextss��"�����r2c��	|jjSr��r�rVr�s r0rVzSSLObject.sessionws��/��|�#�#r2c��||j_dSr�r��rFrVs  r0rVzSSLObject.session|s��&�����r2c��	|jjSr��r��session_reusedr�s r0r�zSSLObject.session_reused�s��<��|�*�*r2c��	|jjSr�)r�rQr�s r0rQzSSLObject.server_side�s��3��|�'�'r2c��	|jjSr�)r�rTr�s r0rTzSSLObject.server_hostname�s��	#��|�+�+r2�c�x�	|�|j�||��}n|j�|��}|Sr�)r��read)rFr�buffer�vs    r0r�zSSLObject.read�sB��	�
����!�!�#�v�.�.�A�A���!�!�#�&�&�A��r2c�8�	|j�|��Sr�)r��write�rFr�s  r0r�zSSLObject.write�s��	�
�|�!�!�$�'�'�'r2c�8�	|j�|��Sr�)r��getpeercert�rF�binary_forms  r0r�zSSLObject.getpeercert�s��	��|�'�'��4�4�4r2c�@�	tjdtd���dS�Nr`r�ra)rrr
r�s r0�selected_npn_protocolzSSLObject.selected_npn_protocol�s5��	�	�
�5���	
�	
�	
�	
�	
�	
r2c�6�	|j���Sr�)r��selected_alpn_protocolr�s r0r�z SSLObject.selected_alpn_protocol�s��	��|�2�2�4�4�4r2c�6�	|j���Sr�)r��cipherr�s r0r�zSSLObject.cipher�s��	(��|�"�"�$�$�$r2c�6�	|j���Sr�)r��shared_ciphersr�s r0r�zSSLObject.shared_ciphers�s��	��|�*�*�,�,�,r2c�6�	|j���Sr�)r��compressionr�s r0r�zSSLObject.compression�s��	P��|�'�'�)�)�)r2c�6�	|j���Sr�)r��pendingr�s r0r�zSSLObject.pending�s��F��|�#�#�%�%�%r2c�:�	|j���dSr�)r��do_handshaker�s r0rzSSLObject.do_handshake�s��*���!�!�#�#�#�#�#r2c�6�	|j���Sr�)r��shutdownr�s r0�unwrapzSSLObject.unwrap�s��/��|�$�$�&�&�&r2r�c�8�	|j�|��Sr�)r��get_channel_binding�rF�cb_types  r0rzSSLObject.get_channel_binding�s ��	M��|�/�/��8�8�8r2c�6�	|j���Sr��r�r�r�s r0r�zSSLObject.version�s��	!��|�#�#�%�%�%r2c�4�|j���Sr�)r��verify_client_post_handshaker�s r0rz&SSLObject.verify_client_post_handshake�s���|�8�8�:�:�:r2)FNNN�r�N�F�r�)rKrLrMr�r6rXr�rUr�rVr�rQrTr�r�r�r�r�r�r�r�r�rrrr�rrDr2r0r�r�Ms�������
�
�
�
��5:�=A�	�	�	��[�	��$�$��X�$�
�^�#�#��^�#��$�$��X�$�
�^�'�'��^�'��+�+��X�+��(�(��X�(��,�,��X�,�

�
�
�
�(�(�(�5�5�5�5�
�
�
�5�5�5�%�%�%�
-�-�-�*�*�*�
&�&�&�$�$�$�'�'�'�9�9�9�9�&�&�&�
;�;�;�;�;r2r�c�P�	tt|j��j|_|Sr�)�getattrr�rK�__doc__)�funcs r0�_sslcopydocr�s ��4��9�d�m�4�4�<�D�L��Kr2c����eZdZ	d�Ze			d0�fd�	��Zeed�����Zej	d���Zeed�����Z
e
j	d	���Z
eed
�����Zd�Zd1d�Z
d
�Zd2d�Zd�Zed3d���Zed���Zed���Zed���Zed���Zed���Zd4�fd�	Zd1�fd�	Zd�Zd4�fd�	Zd5�fd�	Zd6�fd�	Zd7�fd�	Zd6�fd�	Zd7�fd �	Zd!�Z d"�Z!ed#���Z"�fd$�Z#ed%���Z$ed&���Z%�fd'�Z&ed3d(���Z'�fd)�Z(d*�Z)d+�Z*�fd,�Z+ed8d.���Z,ed/���Z-�xZ.S)9�	SSLSocketc�:�t|jj�d����)NzX does not have a public constructor. Instances are returned by SSLContext.wrap_socket().r�r�s   r0r�zSSLSocket.__init__�s+����~�&�
)�
)�
)�
�
�	
r2FTNc���|�tt��tkrt	d���|r"|rtd���|�td���|jr|std���|���}t|j	|j
|j|������}	|j
|fi|	��}
tt|
��jdi|	��|���	||
_||
_d|
_d|
_||
_|�|��|
_||
_||
_	|
���d}n�#t8$r�}|jt:jkr�d}|
���}
|
� d��	|
�!d��}n9#t8$r,}|jt:jt:j"fvr�d	}Yd}~nd}~wwxYw|
� |
��|r/d
}tG|j|��}||_$d|_%	|�#d}wxYwYd}~nd}~wwxYw|
�&|��||
_'|rm|
j�(|
||
j|
|
j���|
_|r=|
���}|dkrtd
���|
�)��n,#	|
�*��n#t8$rYnwxYw�xYw|
S)Nz!only stream sockets are supportedz4server_hostname can only be specified in client modez,session can only be specified in client modez'check_hostname requires server_hostname)�family�type�proto�filenoFTr�r2z5Closed before TLS handshake with data in recv buffer.�r�rV�zHdo_handshake_on_connect should not be specified for non-blocking socketsrD)+�
getsockoptr�r�r��NotImplementedErrorr�r��
gettimeout�dictrrrrr*r)rr��detach�_context�_session�_closedr�rQrNrTrRrS�getpeernamer��errno�ENOTCONN�getblocking�setblocking�recv�EINVALr�reason�library�
settimeout�
_connected�_wrap_socketr�close)r,rPrQrRrSrTrUrV�sock_timeoutrErF�	connected�e�blocking�notconn_pre_handshake_datar-� notconn_pre_handshake_data_error�timeoutr.s                  �r0rXzSSLSocket._create�s�����?�?�:�w�/�/�;�>�>�%�&I�J�J�J��	0��
3� �"2�3�3�3��"� �"/�0�0�0��!�	H�/�	H��F�G�G�G����(�(����;�T�Y�d�j��;�;�=�=�
�
�
���s�{�3�)�)�&�)�)��'��i����'�1�1�&�1�1�1����
�
�
�C	�#�D�M�#�D�M� �D�L��D�L�*�D��#*�#;�#;�O�#L�#L�D� �+B�D�(�(<�D�%�#
!�� � �"�"�"�D!�	�	��C�
@�
@�
@��7�e�n�,�,��!�	��+�+�-�-��� � ��'�'�'�
5�
26���1���.�.���5�5�5��w�u�~�u�|�&D�D�D��14�.�.�.�.�.�.�����	5����
� � ��*�*�*�-�
@�U�F�7?����7P�7P�4�>D�4�;�?C�4�<�@�>�>��<@�8�?�?�?�?�
@�
@�
@�
@�
@�����%
@����F
�O�O�L�)�)�)�'�D�O��
(�#�}�9�9��+�t�';���
� :� � ���+�(�"�o�o�/�/�G��#�~�~�(�)s�t�t�t��%�%�'�'�'���	�
��
�
�������
�
�
���
���������s��AK�
E$�!K�$
I�.AI
�0G�I
�
G<�"G7�2I
�7G<�<?I
�<H>�>I�I
�K�
I�BK�L�!K6�5L�6
L�L�L�Lc��|jSr�)r#r�s r0rUzSSLSocket.contextYs���}�r2c�,�||_||j_dSr�)r#r�rUr�s  r0rUzSSLSocket.context^s����
�"�����r2c�,�|j�|jjSdSr�r�r�s r0rVzSSLSocket.sessioncs���<�#��<�'�'�$�#r2c�>�||_|j�||j_dSdSr�)r$r�rVr�s  r0rVzSSLSocket.sessionis)����
��<�#�#*�D�L� � � �$�#r2c�,�|j�|jjSdSr�r�r�s r0r�zSSLSocket.session_reusedos���<�#��<�.�.�$�#r2c�:�td|jjz���)NzCan't dup() %s instances)rr.rKr�s r0�dupz
SSLSocket.dupus$��!�"<�"&�.�"9�#:�;�;�	;r2c��dSr�rD)rF�msgs  r0�_checkClosedzSSLSocket._checkClosedys���r2c�@�|js|���dSdSr�)r0r&r�s r0�_check_connectedzSSLSocket._check_connected}s0����	�

��������	�	r2r�c�D�	|���|j�td���	|�|j�||��S|j�|��S#t$r1}|jdtkr|jr|�Yd}~dSYd}~dS�d}~wwxYw)Nz'Read on closed or unwrapped SSL socket.rr2)rCr�r�r�rrD�
SSL_ERROR_EOFrS)rFrr��xs    r0r�zSSLSocket.read�s���	-�	
�������<���F�G�G�G�	��!��|�(�(��f�5�5�5��|�(�(��-�-�-���	�	�	��v�a�y�M�)�)�d�.G�)��%��1�1�1�1�1��3�3�3�3�3������	���s#�A$�
A$�$
B�.B�B�Bc��	|���|j�td���|j�|��S)Nz(Write on closed or unwrapped SSL socket.)rCr�r�r�r�s  r0r�zSSLSocket.write�sH��	9�	
�������<���G�H�H�H��|�!�!�$�'�'�'r2c��|���|���|j�|��Sr�)rCrEr�r�r�s  r0r�zSSLSocket.getpeercert�s<���������������|�'�'��4�4�4r2c�f�|���tjdtd���dSr�)rCrrr
r�s r0r�zSSLSocket.selected_npn_protocol�s=���������
�5���	
�	
�	
�	
�
�tr2c��|���|j�tjsdS|j���Sr�)rCr�rNrr�r�s r0r�z SSLSocket.selected_alpn_protocol�s<���������<��t�}���4��<�6�6�8�8�8r2c�n�|���|j�dS|j���Sr�)rCr�r�r�s r0r�zSSLSocket.cipher�s5���������<���4��<�&�&�(�(�(r2c�n�|���|j�dS|j���Sr�)rCr�r�r�s r0r�zSSLSocket.shared_ciphers�s5���������<���4��<�.�.�0�0�0r2c�n�|���|j�dS|j���Sr�)rCr�r�r�s r0r�zSSLSocket.compression�s5���������<���4��<�+�+�-�-�-r2rc����|���|j�7|dkrtd|jz���|j�|��St���||��S)Nrz3non-zero flags not allowed in calls to send() on %s)rCr�r�r.r�r)�send)rFr�r�r.s   �r0rQzSSLSocket.send�su����������<�#���z�z� �I��N�#�$�$�$��<�%�%�d�+�+�+��7�7�<�<��e�,�,�,r2c���|���|j�td|jz���|�"t	���||��St	���|||��S)Nz%sendto not allowed on instances of %s)rCr�r�r.r)�sendto)rFr��
flags_or_addrr�r.s    �r0rSzSSLSocket.sendto�ss����������<�#��D�!�^�,�-�-�
-�
�\��7�7�>�>�$�
�6�6�6��7�7�>�>�$�
�t�<�<�<r2c�0�td|jz���)Nz&sendmsg not allowed on instances of %s�rr.r�s   r0�sendmsgzSSLSocket.sendmsg�s#��"�"J�"&�.�#1�2�2�	2r2c����|���|j��|dkrtd|jz���d}t	|��5}|�d��5}t
|��}||kr(|�||d���}||z
}||k�(ddd��n#1swxYwYddd��dS#1swxYwYdSt���	||��S)Nrz6non-zero flags not allowed in calls to sendall() on %s�B)
rCr�r�r.�
memoryview�castrrQr)�sendall)	rFr�r�r��view�	byte_view�amountr�r.s	        �r0r\zSSLSocket.sendall�sx����������<�#���z�z� �L��N�#�$�$�$��E��D�!�!�
�T�4�9�9�S�>�>�
�Y��Y�����f�n�n��	�	�)�E�F�F�"3�4�4�A��Q�J�E��f�n�n�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�
�
��7�7�?�?�4��/�/�/s6�C�!>B+�C�+B/	�/C�2B/	�3C�C�
Cc���	|j�|�|||��St���|||��Sr�)r��_sendfile_use_sendr)�sendfile)rF�file�offsetr�r.s    �r0rbzSSLSocket.sendfile�sH���	��<�#��*�*�4���?�?�?��7�7�#�#�D�&�%�8�8�8r2c����|���|j�2|dkrtd|jz���|�|��St���||��S)Nrz3non-zero flags not allowed in calls to recv() on %s)rCr�r�r.r�r)r+�rF�buflenr�r.s   �r0r+zSSLSocket.recvsq����������<�#���z�z� �I��N�#�$�$�$��9�9�V�$�$�$��7�7�<�<���.�.�.r2c�X��|���|�7|�3t|��5}|j}ddd��n#1swxYwY|sd}nd}|j�3|dkrt	d|jz���|�||��St���|||��S)Nr�rz8non-zero flags not allowed in calls to recv_into() on %s)	rCrZ�nbytesr�r�r.r�r)�	recv_into)rFr�rir�r]r.s     �r0rjzSSLSocket.recv_intos�����������>��!���'�'�)�4�!�[�F�)�)�)�)�)�)�)�)�)�)�)����)�)�)�)��"�!�F�����<�#���z�z� �L��.�!�"�"�"��9�9�V�V�,�,�,��7�7�$�$�V�V�U�;�;�;s�=�A�Ac���|���|j�td|jz���t	���||��S)Nz'recvfrom not allowed on instances of %s)rCr�r�r.r)�recvfromrfs   �r0rlzSSLSocket.recvfrom&sX����������<�#��F�!�^�,�-�-�
-��7�7�#�#�F�E�2�2�2r2c���|���|j�td|jz���t	���|||��S)Nz,recvfrom_into not allowed on instances of %s)rCr�r�r.r)�
recvfrom_into)rFr�rir�r.s    �r0rnzSSLSocket.recvfrom_into.sZ����������<�#��K�!�^�,�-�-�
-��7�7�(�(����?�?�?r2c�0�td|jz���)Nz&recvmsg not allowed on instances of %srVr�s   r0�recvmsgzSSLSocket.recvmsg6s!��!�"J�"&�.�#1�2�2�	2r2c�0�td|jz���)Nz+recvmsg_into not allowed on instances of %srVr�s   r0�recvmsg_intozSSLSocket.recvmsg_into:s#��!�#'�)-��#8�9�9�	9r2c�n�|���|j�|j���SdS�Nr)rCr�r�r�s r0r�zSSLSocket.pending>s5���������<�#��<�'�'�)�)�)��1r2c���|���d|_t���|��dSr�)rCr�r)r)rF�howr.s  �r0rzSSLSocket.shutdownFs:������������
����������r2c��|jr"|j���}d|_|Stdt|��z����NzNo SSL wrapper around )r�rr�rK)rF�ss  r0rzSSLSocket.unwrapKsF���<�	C���%�%�'�'�A��D�L��H��5��D�	�	�A�B�B�Br2c��|jr|j���Stdt|��z���rx)r�rr�rKr�s r0rz&SSLSocket.verify_client_post_handshakeTs;���<�	C��<�<�<�>�>�>��5��D�	�	�A�B�B�Br2c�V��d|_t�����dSr�)r�r)�_real_closer�s �r0r|zSSLSocket._real_close[s&������
���������r2c�"�|���|���}	|dkr|r|�d��|j���|�|��dS#|�|��wxYw)Nr)rEr r/r�r)rF�blockr9s   r0rzSSLSocket.do_handshake_s����������/�/�#�#��	%��#�~�~�%�~�����%�%�%��L�%�%�'�'�'��O�O�G�$�$�$�$�$��D�O�O�G�$�$�$�$���s�6A7�7Bc����|jrtd���|js|j�td���|j�|d|j||j���|_	|r"t���	|��}n#d}t���
|��|s"d|_|jr|���|S#ttf$r	d|_�wxYw)Nz!can't connect in server-side modez/attempt to connect already-connected SSLSocket!FrT)rQr�r0r�rUr1rTr$r)�
connect_ex�connectrRrr�)rFr�r��rcr.s    �r0�
_real_connectzSSLSocket._real_connectjs�����	B��@�A�A�A��?�	P�d�l�6��N�O�O�O��|�0�0��%��-���
�1�
�
���
	��
&��W�W�'�'��-�-�����������%�%�%��
(�"&����/�(��%�%�'�'�'��I����$�	�	�	��D�L��	���s
�$A,C�C+c�4�	|�|d��dS)NF�r��rFr�s  r0r�zSSLSocket.connect�s#��	����4��'�'�'�'�'r2c�0�	|�|d��Sr�r�r�s  r0r�zSSLSocket.connect_ex�s��	��!�!�$��-�-�-r2c���	t�����\}}|j�||j|jd���}||fS)NT)rRrSrQ)r)�acceptrUrYrRrS)rF�newsockr�r.s   �r0r�zSSLSocket.accept�sZ���	>������(�(�
����,�*�*�7�,0�,H�)-�)B� $�+�&�&����}�r2r�c��|j�|j�|��S|tvr"td�|�����dS)Nz({0} channel binding type not implemented)r�r�CHANNEL_BINDING_TYPESr�r�rs  r0rzSSLSocket.get_channel_binding�sV���<�#��<�3�3�G�<�<�<��3�3�3� �>�E�E�g�N�N�����4r2c�F�|j�|j���SdSr�r	r�s r0r�zSSLSocket.version�s#���<�#��<�'�'�)�)�)��4r2)FTTNNNr�rr
)r)rN)r�rrtr)/rKrLrMr�r6rXr�rrUr�rVr�r@rCrEr�r�r�r�r�r�r�r�rQrSrWr\rbr+rjrlrnrprrr�rrrr|rr�r�r�r�rr�r7r8s@r0rr�si�������;�
�
�
��FJ�;?�&*�\�\�\�\�\��[�\�|�����[��X��
�^�#�#��^�#���(�(��[��X�(�
�^�+�+��^�+�
��/�/��[��X�/�;�;�;�
�
�
�
��������*(�(�(��5�5�5��[�5�
����[���9�9��[�9��)�)��[�)��1�1��[�1��.�.��[�.�	-�	-�	-�	-�	-�	-�=�=�=�=�=�=�2�2�2�0�0�0�0�0�0� 9�9�9�9�9�9�	/�	/�	/�	/�	/�	/�<�<�<�<�<�<�&3�3�3�3�3�3�@�@�@�@�@�@�2�2�2�9�9�9�����[�������
�C�C��[�C��C�C��[�C�������%�%�%��[�%������4(�(�(�
.�.�.�

�
�
�
�
������[������[�����r2rTc
�p�tjdtd���|r|std���|r|std���t	|��}
||
_|r|
�|��|r|
�||��|	r|
�|	��|
�	||||���S)Nz=ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket()r�rz5certfile must be specified for server-side operationsr�)rPrQrRrS)
rrr
r�r>r�r~r��set_ciphersrY)rPr�r�rQr��ssl_version�ca_certsrRrS�ciphersrUs           r0rYrY�s���
�M�G�#������
�'�8�'��&�'�'�	'��7�x�7��5�6�6�6���%�%�G�#�G���0��%�%�h�/�/�/��3�����'�2�2�2��%����G�$�$�$����
�{� 7�1����r2c�6�	ddlm}ddlm}d}d}	|�|dd������dz}||dd�|��}||d|f|dd	�z��S#t$rt
d
|�d|�d����wxYw)
Nr)�strptime)�timegm)�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�Decz %d %H:%M:%S %Y GMTr�r�r�r�z
time data z does not match format "%b�")�timer��calendarr��index�titler�)�	cert_timer�r��months�time_format�month_number�tts       r0�cert_time_to_secondsr��s�����������������F�(�K�
7��|�|�I�b�q�b�M�$7�$7�$9�$9�:�:�Q�>���X�i����m�[�
1�
1���v�r�!�u�l�+�b��1��g�5�6�6�6���F�F�F��j�-6�Y�Y����E�F�F�	F�F���s�2A7�7!Bz-----BEGIN CERTIFICATE-----z-----END CERTIFICATE-----c���	ttj|��dd���tg}|�fd�t	dt���d��D��z
}|�tdz��d�|��S)N�ASCII�strictc�*��g|]}�||dz���S)�@rD)rE�i�fs  �r0�
<listcomp>z(DER_cert_to_PEM_cert.<locals>.<listcomp>�s%���
3�
3�
3��1�Q�q��t�V�9�
3�
3�
3r2rr��
)	rK�base64�standard_b64encode�
PEM_HEADER�rangerr�
PEM_FOOTERr)�der_cert_bytes�ssr�s  @r0�DER_cert_to_PEM_certr��s����&�	�F�%�n�5�5�w��I�I�A�
��B��
3�
3�
3�
3�e�A�s�1�v�v�r�2�2�
3�
3�
3�3�B��I�I�j�4�� � � ��9�9�R�=�=�r2c��	|�t��stdtz���|����t
��stdt
z���|���t
t��t
t
���}tj|�	dd����S)Nz(Invalid PEM encoding; must start with %sz&Invalid PEM encoding; must end with %sr�r�)
r-r�r��strip�endswithr�rr��decodebytesrL)�pem_cert_string�ds  r0�PEM_cert_to_DER_certr��s���4��%�%�j�1�1�'��C�%�&�'�'�	'�� � �"�"�+�+�J�7�7�'��A�%�&�'�'�	'�������J����Z���0@� @�A�A���a�h�h�w��9�9�:�:�:r2c�L�	|\}}|�t}nt}t|||���}t||���5}|�||���5}	|	�d��}
ddd��n#1swxYwYddd��n#1swxYwYt
|
��S)N)r�r#)r9)rTT)r�r��_create_stdlib_contextr�rYr�r�)r�r�r�r9�host�portr�rUrP�sslsock�dercerts           r0�get_server_certificater�
s5����J�D�$���!�	�	��	�$�[�/8�,4�6�6�6�G�
�4��	1�	1�	1�0�T�
�
 �
 ��t�
 �
<�
<�	0���)�)�$�/�/�G�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0� ��(�(�(s5�B�A5�)B�5A9	�9B�<A9	�=B�B�Bc�8�t�|d��S)Nz	<unknown>)�_PROTOCOL_NAMESr)�
protocol_codes r0�get_protocol_namer� s�����}�k�:�:�:r2r�)or�r�collectionsr�enumr�_Enumr�_IntEnumr�_IntFlagrrNrr	r
rrr
rrrrrrrrr+rr0rrrrr�ImportErrorrrrrr r!r"r#r$r%r&r'�	_convert_rKr(rBr+�__members__�itemsr�r�_SSLv2_IF_EXISTSrJr^rlr�r�r�r�r�r�r�r�r�r�r�r�r'rr��socket_errorr�r��HAS_NEVER_CHECK_COMMON_NAME�_RESTRICTED_SERVER_CIPHERSr�r�r�rrrrr&r:r>r;r�r�r��_create_default_https_contextr�r�rrrWr[rYr�r�r�r�r�r�r�r�rDr2r0�<module>r�s���X�t�
�
�
�	�	�	�	�"�"�"�"�"�"�H�H�H�H�H�H�H�H�H�H�����������N�N�N�N�N�N�N�N�N�N�3�3�3�3�3�3�3�3�3�3�������������������:�9�9�9�9�9�9�9�E�E�E�E�E�E�E�E�E�E�E�E�	����������	�	�	��D�	����
������������������������8�7�7�7�7�7�7�7�����(�K�K������
���
�x�'�'������
�����6�6������
����h�.�.������
����8�+�+������
����(�)�)������
0:�/F�F��*�,�Q�Q�*�2H�2N�2N�2P�2P�Q�Q�Q���7�:�'7��>�>����h���5�5�5�5�5�5�5���5���h���������������h���&"�&"�&"�&"�&"�&"�&"���&"�R��h��� � � � � � � ��� �:�<�7���1�1�1�1�1�1�1�1�9�9�9�9�9�9�9�9�9�9�?�?�?�?�?�?�?�?�?�?�����
�
�
�
�����������%���%�g�d�,J�K�K��.��+��.>�.>�.>�b D� D� D�F	�	�	�;0�;0�;0�| �Z� 4�����&�&�&�@�@�@�@�@�*�*�]�,H�I�I�@�@�@�*&�&�&�&�&�k�5�&�&�&�BG�BG�BG�BG�BG��BG�BG�BG�J$+�#6�$�$�"&�t�$�$�$�$�$�L4�9�*/��9L�$(�$�"&�t�D�4�4�4�4�4�n!7��4��X;�X;�X;�X;�X;�X;�X;�X;�v���|�|�|�|�|��|�|�|�@'�
��&�
��#�T�!�Y�(�4�(,�%)������@7�7�7�<+�
�
(�
����;�;�;�.A�$(�2I�)�)�)�)�,;�;�;�;�;s�A&�&A.�-A.