Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/Python/Python314/Lib/__pycache__/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/Python/Python314/Lib/__pycache__/ssl.cpython-314.pyc

+
��h�����Rt^RIt^RIt^RIHt^RIHtHt	H
t^RIHt^RI
t
^RI
HtHtHt^RI
HtHtHt^RI
HtHtHtHtHtHtHt^RI
HtHt^R	I
HtH t H!t!^R
I
H"t"^RI
H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/^RI
H0t0H1t1]	Pd!R
]3R]
R7]Pd!R]3R]
R7]	Pd!R]3R]
R7]	Pd!R]3R]
R7]Pd!R]3R]
R7]	Pd!R]3R]
R7]4Pj;t6]4n6]4PnPq4UUu/uFwrWbK		uppt9]:!]4RR4t;]!]	4!RR44t<]!]	4!RR44t=]!]	4!RR 44t>]!]	4!R!R"44t?]P�R#8Xd	^R$I
HAtAHBtB^R%ICHCtCHDtDHEtE^R&ICHFtFHGtGHHtH^RICtI^RIJtJ^RIKtK^RILtL]MtNR'.tO]P!]
R(4tQ]0tR]tSR)tTR*tUR+tV]!R,R-4tWR.tX!R/R0]!R0R144tY!R2R3]Y]4tZ!R4R5]4t[]ZP�3R6RR7RR8R/R9llt]RMR:]^R;R<R=]ZP�R>RR?RR6RR7RR8R/R@llt_]]t`]_ta!RARB4tbRCtc!RDRE]C4td]d][ne]b][nfRFtgRGthRHtiRItjRJtk]lR]H3RKltmRLtnR# ]#dELai;iuuppi)Na�
This module provides some more Pythonic support for SSL.

Object types:

  SSLSocket -- subtype of socket.socket which does SSL over the socket

Exceptions:

  SSLError -- exception raised for I/O errors

Functions:

  cert_time_to_seconds -- convert time string used for certificate
                          notBefore and notAfter functions to integer
                          seconds past the Epoch (the time values
                          returned from time.time())

  get_server_certificate (addr, ssl_version, ca_certs, timeout) -- Retrieve the
                          certificate from the server at the specified
                          address and return it as a PEM-encoded string


Integer constants:

SSL_ERROR_ZERO_RETURN
SSL_ERROR_WANT_READ
SSL_ERROR_WANT_WRITE
SSL_ERROR_WANT_X509_LOOKUP
SSL_ERROR_SYSCALL
SSL_ERROR_SSL
SSL_ERROR_WANT_CONNECT

SSL_ERROR_EOF
SSL_ERROR_INVALID_ERROR_CODE

The following group define certificate requirements that one side is
allowing/requiring from the other side:

CERT_NONE - no certificates from the other side are required (or will
            be looked at if provided)
CERT_OPTIONAL - certificates are not required, but if provided will be
                validated, and if validation fails, the connection will
                also fail
CERT_REQUIRED - certificates are required, and will be validated, and
                if validation fails, the connection will also fail

The following constants identify various SSL protocol variants:

PROTOCOL_SSLv2
PROTOCOL_SSLv3
PROTOCOL_SSLv23
PROTOCOL_TLS
PROTOCOL_TLS_CLIENT
PROTOCOL_TLS_SERVER
PROTOCOL_TLSv1
PROTOCOL_TLSv1_1
PROTOCOL_TLSv1_2

The following constants identify various SSL alert message descriptions as per
http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6

ALERT_DESCRIPTION_CLOSE_NOTIFY
ALERT_DESCRIPTION_UNEXPECTED_MESSAGE
ALERT_DESCRIPTION_BAD_RECORD_MAC
ALERT_DESCRIPTION_RECORD_OVERFLOW
ALERT_DESCRIPTION_DECOMPRESSION_FAILURE
ALERT_DESCRIPTION_HANDSHAKE_FAILURE
ALERT_DESCRIPTION_BAD_CERTIFICATE
ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE
ALERT_DESCRIPTION_CERTIFICATE_REVOKED
ALERT_DESCRIPTION_CERTIFICATE_EXPIRED
ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN
ALERT_DESCRIPTION_ILLEGAL_PARAMETER
ALERT_DESCRIPTION_UNKNOWN_CA
ALERT_DESCRIPTION_ACCESS_DENIED
ALERT_DESCRIPTION_DECODE_ERROR
ALERT_DESCRIPTION_DECRYPT_ERROR
ALERT_DESCRIPTION_PROTOCOL_VERSION
ALERT_DESCRIPTION_INSUFFICIENT_SECURITY
ALERT_DESCRIPTION_INTERNAL_ERROR
ALERT_DESCRIPTION_USER_CANCELLED
ALERT_DESCRIPTION_NO_RENEGOTIATION
ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION
ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE
ALERT_DESCRIPTION_UNRECOGNIZED_NAME
ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE
ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE
ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY
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_egd)�HAS_SNI�HAS_ECDH�HAS_NPN�HAS_ALPN�	HAS_SSLv2�	HAS_SSLv3�	HAS_TLSv1�HAS_TLSv1_1�HAS_TLSv1_2�HAS_TLSv1_3�HAS_PSK�HAS_PHA)�_DEFAULT_CIPHERS�_OPENSSL_API_VERSION�
_SSLMethodc�>�VPR4;'dVR8g#)�	PROTOCOL_�PROTOCOL_SSLv23��
startswith��names&�?C:\Users\ITO\AppData\Local\Programs\Python\Python314\Lib\ssl.py�<lambda>r1}s������-�K�K�$�:K�2K�K�)�source�Optionsc�$�VPR4#)�OP_r,r.s&r0r1r1�s
������'r2�AlertDescriptionc�$�VPR4#)�ALERT_DESCRIPTION_r,r.s&r0r1r1�s�����!5�6r2�SSLErrorNumberc�$�VPR4#)�
SSL_ERROR_r,r.s&r0r1r1�s
������.r2�VerifyFlagsc�$�VPR4#)�VERIFY_r,r.s&r0r1r1�s
������+r2�
VerifyModec�$�VPR4#)�CERT_r,r.s&r0r1r1�s
������)r2�PROTOCOL_SSLv2c��]tRt^�t]P
t]Pt]Pt
]Pt]Pt]Pt]P"tRtR#)�
TLSVersion�N)�__name__�
__module__�__qualname__�__firstlineno__�_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_SUPPORTED�__static_attributes__rFr2r0rErE�sQ���4�4�����E����E�� � �G�� � �G�� � �G��4�4�r2rEc�2�]tRt^�tRt^t^t^t^tRt	Rt
RtR#)�_TLSContentTypez8Content types (record layer)

See RFC 8446, section B.1
��rFN)rGrHrIrJ�__doc__�CHANGE_CIPHER_SPEC�ALERT�	HANDSHAKE�APPLICATION_DATA�HEADER�INNER_CONTENT_TYPErZrFr2r0r\r\�s*������E��I���
�F��r2r\c��]tRt^�tRt^t^
t^t^t^t	^t
^(t^)t^*t
^+t^,t^-t^.t^/t^0t^1t^2t^3t^<t^Ft^Gt^Pt^Vt^Zt^dt^mt^nt^ot ^pt!^qt"^rt#^st$^tt%^xt&Rt'R#)�
_TLSAlertTypezIAlert types for TLSContentType.ALERT messages

See RFC 8466, section B.2
rFN)(rGrHrIrJr_�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_PROTOCOLrZrFr2r0rgrg�s�����L����N����O������N��O� �����������J��M��L��M��������N����M�������"����&)�#�!$������!�r2rgc�r�]tRt^�tRt^t^t^t^t^t	^t
^t^t^t
^t^
t^t^t^t^t^t^t^t^t^Ct^�tRtRtR#)�_TLSMessageTypez>Message types (handshake protocol)

See RFC 8446, section B.3
r^rFN)rGrHrIrJr_�
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_HASHr`rZrFr2r0r�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�J�V'gR#VPR4pV'g"VP4VP48H#V^8�d\RPV44hVP	R4wr4pRV9d\RPV44hV'g\RPV44hVR8wd\RPV44hVP	R4wrdpV'd	V'gR#VP4VP48H#)a�Matching according to RFC 6125, section 6.4.3

- Hostnames are compared lower-case.
- For IDNA, both dn and hostname must be encoded as IDN A-label (ACE).
- Partial wildcards like 'www*.example.org', multiple wildcards, sole
  wildcard or wildcards in labels other then the left-most label are not
  supported and a CertificateError is raised.
- A wildcard must match at least one character.
F�*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�s��������
�I���x�x�z�X�^�^�-�-�-��1�}��?�F�F�r�J�L�	L�&(�\�\�#�%6�"�K�l�
�l���
��F�2�J� �	 ���
��F�2�J� �	 ��c���
��F�2�J� �	 �2:�1C�1C�C�1H�.��.��C������#5�#;�#;�#=�=�=r2c��\P!V4p\P!V4V8XdV#\RP	V44h \
dMi;i\P!\PT4# \
d\RP	T44h\dMi;i\RP	T44h)z�Try to convert an IP address to packed binary form

Supports IPv4 addresses on all platforms and IPv6 on platforms with IPv6
support.
z'{!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��
���
��
��
�� � ��!1�!1�6�:�:���4��$�$*�F�6�N�4�	4��
��
���3�:�:�6�B�
C�Cs)�A�A�A�!$B�-B8�4B8�7B8c�<�\VP44pW!8H#)z|Exact matching of IP addresses.

RFC 6125 explicitly doesn't define an algorithm for this
(section 1.7.2 - "Out of Scope").
)r��rstrip)�cert_ipaddress�host_ip�ips&& r0�_ipaddress_matchr�ls��
�^�*�*�,�	-�B�
�=�r2�DefaultVerifyPathszQcafile capath openssl_cafile_env openssl_cafile openssl_capath_env openssl_capathc��\P!4p\PP	V^,V^,4p\PP	V^,V^,4p\\PPV4'dTMR\PPV4'dTMR.VO5!#)z/Return paths to default cafile and capath.
    N)	rK�get_default_verify_paths�os�environ�getr��path�isfile�isdir)�parts�cafile�capaths   r0r�r�|s���
�)�)�+�E��Z�Z�^�^�E�!�H�e�A�h�
/�F�
�Z�Z�^�^�E�!�H�e�A�h�
/�F�������v�(>�(>�f�D�(*���
�
�f�(=�(=�f�4�&�$�&�&r2c�faa�]tRtRtoRtRtV3Rlt]V3Rl4t]V3Rl4t	Rt
VtV;t#)�_ASN1Objecti�z#ASN.1 object identifier lookup
    c�><�\SV`!V.\VRR7O5!#)Fr.��super�__new__�_txt2obj)�cls�oid�	__class__s&&�r0r��_ASN1Object.__new__�s����w��s�?�X�c��%>�?�?r2c�:<�\SV`!V.\V4O5!#)z3Create _ASN1Object from OpenSSL numeric ID
        )r�r��_nid2obj)r��nidr�s&&�r0�fromnid�_ASN1Object.fromnid�s����w��s�3�X�c�]�3�3r2c�><�\SV`!V.\VRR7O5!#)z=Create _ASN1Object from short name, long name or OID
        Tr.r�)r�r/r�s&&�r0�fromname�_ASN1Object.fromname�s ����w��s�?�X�d��%>�?�?r2rF)
rGrHrIrJr_�	__slots__r��classmethodr�r�rZ�__classdictcell__�
__classcell__�r��
__classdict__s@@r0r�r��sE������I�@��4��4�
�@��@�@r2r�znid shortname longname oidc�"�]tRtRtRtRtRtRtR#)�Purposei�zDSSLContext purpose flags with X509v3 Extended Key Usage objects
    z1.3.6.1.5.5.7.3.1z1.3.6.1.5.5.7.3.2rFN)rGrHrIrJr_�SERVER_AUTH�CLIENT_AUTHrZrFr2r0r�r��s���%�K�%�Kr2r�c�aa�]tRtRtoRtR tRtRtR!RltRt	R"Rlt
R#RltRtR	t
R
tRt]P"3Rlt]!]R
4'dA]V3Rl4t]P.V3Rl4t]V3Rl4t]P.V3Rl4t]V3Rl4t]P.V3Rl4t]!]R4'd]R4t]P.R4tM]R4t]V3Rl4t]P.V3Rl4t]V3Rl4t]V3Rl4t]P.V3Rl4t]V3Rl4t]P.V3Rl4tRt Vt!V;t"#)$�
SSLContexti�zxAn SSLContext holds various SSL-related configuration options and
data, such as certificates and possibly a private key.Nc��Vf$\P!R\^R7\p\P
!W4pV#)Nz9ssl.SSLContext() without protocol argument is deprecated.)�category�
stacklevel)�warnings�warn�DeprecationWarning�PROTOCOL_TLSr
r�)r��protocol�args�kwargs�selfs&&*, r0r��SSLContext.__new__�s9�����M�M�K�+��
�
$�H��"�"�3�1���r2c��VfR#\V\4'd!VPR4PR4#VPR4#)N�idna�ascii)�
isinstance�str�encode�decode)rr�s&&r0�_encode_hostname�SSLContext._encode_hostname�sA�����
��#�
&�
&��?�?�6�*�1�1�'�:�:��?�?�7�+�+r2c
�F�VPPVVVVVVVR7#))�sock�server_side�do_handshake_on_connect�suppress_ragged_eofs�server_hostname�context�session)�sslsocket_class�_create)rrrrrrrs&&&&&&&r0�wrap_socket�SSLContext.wrap_socket�s7���#�#�+�+��#�$;�!5�+���,�
�	
r2c	�^�VPPWVVPV4WPR7#))rrrr)�sslobject_classrr
)r�incoming�outgoingrrrs&&&&&&r0�wrap_bio�SSLContext.wrap_bio�s8���#�#�+�+��K� �1�1�/�B��,�
�	
r2c�L�\P!R\^R7\4pVFep\	VR4p\V4^8Xg\V4^�8�d\
R4hVP\V44VPV4Kg	VPV4R#)�'ssl NPN is deprecated, use ALPN instead�r�rz(NPN protocols must be 1 to 255 in lengthN)
r�r�r��	bytearray�bytes�lenr
�append�extend�_set_npn_protocols)r�
npn_protocols�protosr�bs&&   r0�set_npn_protocols�SSLContext.set_npn_protocols�s����
�
�5���	
�
���%�H��h��(�A��1�v��{�c�!�f�s�l��I�J�J��M�M�#�a�&�!��M�M�!��&�	
����'r2c�xaa�Sf
RSnR#\S4'g\R4hVV3RlpVSnR#)Nznot a callable objectc�8<�SPV4pS!WV4#�N)r
)�sslobj�
servername�sslctxr�server_name_callbacks&&&��r0�shim_cb�3SSLContext.set_servername_callback.<locals>.shim_cb�s ���!�2�2�:�>�
�+�F��G�Gr2)�sni_callback�callable�	TypeError)rr5r6sff r0�set_servername_callback�"SSLContext.set_servername_callback�s9����'� $�D���0�1�1�� 7�8�8�
H�!(�D�r2c��\4pVFep\VR4p\V4^8Xg\V4^�8�d\R4hVP	\V44VPV4Kg	VP
V4R#)rz)ALPN protocols must be 1 to 255 in lengthN)r$r%r&r
r'r(�_set_alpn_protocols)r�alpn_protocolsr+rr,s&&   r0�set_alpn_protocols�SSLContext.set_alpn_protocols�sl�����&�H��h��(�A��1�v��{�c�!�f�s�l��J�K�K��M�M�#�a�&�!��M�M�!��'�	
� � ��(r2c�R�\V4F;wr4pVR8XgKVRJgVPV9gK(VPVR7K=	R# \d&p\P
!RT:24Rp?KlRp?ii;i \d\P
!R4R#i;i)�x509_asnT)�cadataz.Bad certificate in Windows certificate store: Nz-unable to enumerate Windows certificate store)r�r��load_verify_locationsr
r�r��PermissionError)r�	storename�purpose�cert�encoding�trust�excs&&&    r0�_load_windows_store_certs�$SSLContext._load_windows_store_certss���
	K�):�9�)E�%����z�)���}����u�(<�d� �6�6�d�6�C�*F�� (�d�$�M�M�,Z�[^�Za�*b�c�c��d���	K��M�M�I�J�	K�s?�B�B�A�B�A>�A9�3B�9A>�>B�!B&�%B&c���\V\4'g\V4h\PR8Xd%VP
FpVP
W!4K	VP4R#)r�N)r	r�r:�sys�platform�_windows_cert_storesrM�set_default_verify_paths)rrHrGs&& r0�load_default_certs�SSLContext.load_default_certssP���'�;�/�/��G�$�$��<�<�7�"�!�6�6�	��.�.�y�B�7��%�%�'r2�minimum_versionc�*<�\\SV`4#r1)rEr�rV�rr�s&�r0rV�SSLContext.minimum_version�����e�g�5�6�6r2c��<�V\P8Xd)V;P\P(,un\
\\`PW4R#r1)	rErO�optionsr4�OP_NO_SSLv3r�r�rV�__set__�r�valuer�s&&�r0rVrYs=����
�(�(�(�����!4�!4� 4�4���*�j�9�A�A�$�Nr2c�*<�\\SV`4#r1)rEr��maximum_versionrXs&�r0rb�SSLContext.maximum_version#rZr2c�J<�\\\`
PW4R#r1)r�r�rbr^r_s&&�r0rbrc's����*�j�9�A�A�$�Nr2c�*<�\\SV`4#r1)r4r�r\rXs&�r0r\�SSLContext.options+s����u�w��'�'r2c�J<�\\\`
PW4R#r1)r�r�r\r^r_s&&�r0r\rf/s���
�j�*�-�5�5�d�Br2r�c�j�VP\P,pV\P8g#r1��_host_flagsrKr�)r�ncss& r0�hostname_checks_common_name�&SSLContext.hostname_checks_common_name4s)���"�"�T�%F�%F�F�C��$�;�;�;�;r2c��V'd+V;P\P(,unR#V;P\P,unR#r1ri)rr`s&&r0rlrm9s6���� � �T�%F�%F�$F�F� �� � �D�$E�$E�E� r2c��R#)TrF�rs&r0rlrm@s��r2c�<<�\SV`pVe
VP#R#)aaTLS message callback

The message callback provides a debugging hook to analyze TLS
connections. The callback is called for any TLS protocol message
(header, handshake, alert, and more), but not for application data.
Due to technical  limitations, the callback can't be used to filter
traffic or to abort a connection. Any exception raised in the
callback is delayed until the handshake, read, or write operation
has been performed.

def msg_cb(conn, direction, version, content_type, msg_type, data):
    pass

conn
    :class:`SSLSocket` or :class:`SSLObject` instance
direction
    ``read`` or ``write``
version
    :class:`TLSVersion` enum member or int for unknown version. For a
    frame header, it's the header version.
content_type
    :class:`_TLSContentType` enum member or int for unsupported
    content type.
msg_type
    Either a :class:`_TLSContentType` enum number for a header
    message, a :class:`_TLSAlertType` enum member for an alert
    message, a :class:`_TLSMessageType` enum member for other
    messages, or int for unsupported message types.
data
    Raw, decrypted message content as bytes
N)r��
_msg_callback�
user_function)r�innerr�s& �r0rr�SSLContext._msg_callbackDs%���B��%�����&�&�&�r2c�<a�Sf%\\\`
PVR4R#\	SR4'g\SR24hV3RlpSVn\\\`
PW4R#)N�__call__z is not callable.c�><�\V4p\V4pV\P8Xd\pM"V\P8Xd\
pM\pV!V4pS!WVW4V4# \dLki;i \dLpi;i \dL:i;ir1)rEr�r\rdrargr�)�conn�	direction�version�content_type�msg_type�data�msg_enum�callbacks&&&&&& �r0rt�'SSLContext._msg_callback.<locals>.innerts����
�$�W�-��
�.�|�<����5�5�5�*����!6�!6�6�(��*��
�#�H�-���D�W�(�D�:�
:��'�
��
��
�
��
���
��
�s4�A,�A=�B�,A:�9A:�=B�
B�B�B)r�r�rrr^�hasattrr:rs)rr�rtr�s&f �r0rrruksg������*�j�7�?�?��d�K���x��,�,��x�j�(9�:�;�;�	:�2'���
�j�*�3�;�;�D�Hr2c�*<�\\SV`4#r1)r(r�rrXs&�r0r�SSLContext.protocol�s����%�'�*�+�+r2c�*<�\\SV`4#r1)r=r��verify_flagsrXs&�r0r��SSLContext.verify_flags�s����5�7�/�0�0r2c�J<�\\\`
PW4R#r1)r�r�r�r^r_s&&�r0r�r��s���
�j�*�2�:�:�4�Gr2c�V<�\SV`p\V4# \dTu#i;ir1)r��verify_moder@r�r_s& �r0r��SSLContext.verify_mode�s1�����#��	��e�$�$���	��L�	�s�
�
(�(c�J<�\\\`
PW4R#r1)r�r�r�r^r_s&&�r0r�r��s���
�j�*�1�9�9�$�Fr2)r8)�CA�ROOTr1)FTTNN)FNN)#rGrHrIrJr_rRrrr�r
rrr-r;r@rMr�r�rTr�r
�propertyrV�setterrbr\rKrlrrrr�r�rZr�r�r�s@@r0r�r��s�����>�)���O��O�	�,�
� 
�(� (�	)�K�*1�)<�)<�(��{�-�.�.�	�	7�
�	7�
�	�	�	O�
 �	O�

�	7�
�	7�
�	�	�	O�
 �	O��(��(�
�^�^�C��C��t�3�4�4�	�	<�
�	<�
%�	+�	+�	F�
,�	F�
�	�
�	��$��$�L���#I��#I�J�,��,��1��1����H��H��������G��G�Gr2r�r�r�rDc���\V\4'g\V4hV\P8Xd#\\4p\VnRVn	M0V\P8Xd\\4pM\V4hV;P\P\P ,,un
V'gV'g	V'dVP#WV4M&VP\$8wdVP'V4\)VR4'dN\*P,P/R4pV'd'\0P2P4'gWTnV#)z�Create a SSLContext object with default settings.

NOTE: The protocol and settings may change anytime without prior
      deprecation. The values represent a fair balance between maximum
      compatibility and security.
T�keylog_filename�
SSLKEYLOGFILE)r	r�r:r�r�r��PROTOCOL_TLS_CLIENT�
CERT_REQUIREDr��check_hostnamer��PROTOCOL_TLS_SERVERr�r�rK�VERIFY_X509_PARTIAL_CHAIN�VERIFY_X509_STRICTrE�	CERT_NONErTr�r�r�r�rP�flags�ignore_environmentr�)rHr�r�rDr�
keylogfiles&$$$  r0�create_default_contextr��s���g�{�+�+��� � �
�'�%�%�%��0�1��+���!%���	�G�'�'�	'��0�1����!�!����T�;�;�!�4�4�5�6����6��%�%�f�f�=�	�	�	�	�	)�	�"�"�7�+��w�)�*�*��Z�Z�^�^�O�4�
��c�i�i�:�:�:�&0�#��Nr2�	cert_reqsr�FrH�certfile�keyfilec�
�\V\4'g\V4hV\P8XdVf\
pM+V\P8XdVf\pM\V4h\V4p	W)n
VeWnV'dRV	n
V'dV'g\R4hV'g	V'dV	PWE4V'gV'g	V'dV	PWgV4M&V	P\8wdV	PV4\!V	R4'dN\"P$P'R4p
V
'd'\(P*P,'gW�nV	#)aCreate a SSLContext object for Python stdlib modules

All Python stdlib modules shall use this function to create SSLContext
objects in order to keep common settings in one place. The configuration
is less restrict than create_default_context()'s to increase backward
compatibility.
Tzcertfile must be specifiedr�r�)r	r�r:r�r�r�r�r�r�r�r�r��load_cert_chainrEr�rTr�r�r�r�rPr�r�r�)rr�r�rHr�r�r�r�rDrr�s&$$$$$$$$  r0�_create_unverified_contextr��s���g�{�+�+��� � �
�'�%�%�%���*�H��	�G�'�'�	'���*�H����!�!���"�G�+����'���!%����x��5�6�6��7�����2���6��%�%�f�f�=�	�	�	�	�	)�	�"�"�7�+��w�)�*�*��Z�Z�^�^�O�4�
��c�i�i�:�:�:�&0�#��Nr2c�Ba�]tRtRtoRtRt]RRl4t]R4t	]	PR4t	]R4t]PR	4t]R
4t]R4t
]R4tRR
ltRtR RltRtRtRtRtRtRtRtRtRtRtR!RltRtRtRtVt R#)"�	SSLObjectia�This class implements an interface on top of a low-level SSL object as
implemented by OpenSSL. This object captures the state of an SSL connection
but does not provide any network IO itself. IO needs to be performed
through separate "BIO" objects which are OpenSSL's IO abstraction layer.

This class does not have a public constructor. Instances are returned by
``SSLContext.wrap_bio``. This class is typically used by framework authors
that want to implement asynchronous IO for SSL through memory buffers.

When compared to ``SSLSocket``, this object lacks the following features:

 * Any form of network IO, including methods such as ``recv`` and ``send``.
 * The ``do_handshake_on_connect`` and ``suppress_ragged_eofs`` machinery.
c�F�\VPPR24h)zU does not have a public constructor. Instances are returned by SSLContext.wrap_bio().�r:r�rG�rrrs&*,r0�__init__�SSLObject.__init__'s+����~�~�&�&�'�(L�
M�
�	
r2Nc	�^�VPV4pVPWVVWuR7pW�nV#))rr�ownerr)r��	_wrap_bio�_sslobj)	r�rrrrrrrr2s	&&&&&&&  r0r�SSLObject._create-s>���{�{�3����"�"��K�+��#�
��
���r2c�.�VPP#)z(The SSLContext that is currently in use.�r�rrps&r0r�SSLObject.context9����|�|�#�#�#r2c�&�WPnR#r1r��r�ctxs&&r0rr�>s��"���r2c�.�VPP#)z!The SSLSession for client socket.�r�rrps&r0r�SSLObject.sessionBr�r2c�&�WPnR#r1r��rrs&&r0rr�Gs��&���r2c�.�VPP#)z.Was the client session reused during handshake�r��session_reusedrps&r0r��SSLObject.session_reusedKs���|�|�*�*�*r2c�.�VPP#)z%Whether this is a server-side socket.)r�rrps&r0r�SSLObject.server_sidePs���|�|�'�'�'r2c�.�VPP#)zVThe currently set server hostname (for SNI), or ``None`` if no
server hostname is set.)r�rrps&r0r�SSLObject.server_hostnameUs���|�|�+�+�+r2c�~�VeVPPW4pV#VPPV4pV#)z�Read up to 'len' bytes from the SSL object and return them.

If 'buffer' is provided, read into this buffer and return the number of
bytes read.
)r��read)rr&�buffer�vs&&& r0r��SSLObject.read[s@�������!�!�#�.�A������!�!�#�&�A��r2c�8�VPPV4#)zWrite 'data' to the SSL object and return the number of bytes
written.

The 'data' argument must support the buffer interface.
)r��write�rr~s&&r0r��SSLObject.writegs���|�|�!�!�$�'�'r2c�8�VPPV4#)z�Returns a formatted version of the data in the certificate provided
by the other end of the SSL channel.

Return None if no certificate was provided, {} if a certificate was
provided, but not validated.
)r��getpeercert�r�binary_forms&&r0r��SSLObject.getpeercertos���|�|�'�'��4�4r2c��VPP4pVf.#VUu.uF!q"P\P4NK#	up#uupi)z�Returns verified certificate chain provided by the other
end of the SSL channel as a list of DER-encoded bytes.

If certificate verification was disabled method acts the same as
``SSLSocket.get_unverified_chain``.
�r��get_verified_chain�public_bytesrK�ENCODING_DER�r�chainrIs&  r0r��SSLObject.get_verified_chainxsG�����/�/�1���=��I�AF�G���!�!�$�"3�"3�4��G�G��G��'Ac��VPP4pVf.#VUu.uF!q"P\P4NK#	up#uupi)zkReturns raw certificate chain provided by the other
end of the SSL channel as a list of DER-encoded bytes.
�r��get_unverified_chainr�rKr�r�s&  r0r��SSLObject.get_unverified_chain�sG�����1�1�3���=��I�AF�G���!�!�$�"3�"3�4��G�G��Gr�c�@�\P!R\^R7R#)z�Return the currently selected NPN protocol as a string, or ``None``
if a next protocol was not negotiated or if NPN is not supported by one
of the peers.r"r#N)r�r�r�rps&r0�selected_npn_protocol�SSLObject.selected_npn_protocol�s��	�
�
�5���	
r2c�6�VPP4#)z�Return the currently selected ALPN protocol as a string, or ``None``
if a next protocol was not negotiated or if ALPN is not supported by one
of the peers.)r��selected_alpn_protocolrps&r0r�� SSLObject.selected_alpn_protocol�s���|�|�2�2�4�4r2c�6�VPP4#)zWReturn the currently selected cipher as a 3-tuple ``(name,
ssl_version, secret_bits)``.)r��cipherrps&r0r��SSLObject.cipher�s���|�|�"�"�$�$r2c�6�VPP4#)zuReturn a list of ciphers shared by the client during the handshake or
None if this is not a valid server connection.
)r��shared_ciphersrps&r0r��SSLObject.shared_ciphers�s���|�|�*�*�,�,r2c�6�VPP4#)z�Return the current compression algorithm in use, or ``None`` if
compression was not negotiated or not supported by one of the peers.)r��compressionrps&r0r��SSLObject.compression�s���|�|�'�'�)�)r2c�6�VPP4#)z8Return the number of bytes that can be read immediately.)r��pendingrps&r0r��SSLObject.pending�s���|�|�#�#�%�%r2c�:�VPP4R#)zStart the SSL/TLS handshake.N)r��do_handshakerps&r0r��SSLObject.do_handshake�s�����!�!�#r2c�6�VPP4#)z!Start the SSL shutdown handshake.)r��shutdownrps&r0�unwrap�SSLObject.unwrap�s���|�|�$�$�&�&r2c�8�VPPV4#)z�Get channel binding data for current connection.  Raise ValueError
if the requested `cb_type` is not supported.  Return bytes of the data
or None if the data is not available (e.g. before the handshake).)r��get_channel_binding�r�cb_types&&r0r��SSLObject.get_channel_binding�s���|�|�/�/��8�8r2c�6�VPP4#)zRReturn a string identifying the protocol version used by the
current SSL channel. �r�r{rps&r0r{�SSLObject.version�s���|�|�#�#�%�%r2c�6�VPP4#r1)r��verify_client_post_handshakerps&r0r�&SSLObject.verify_client_post_handshake�s���|�|�8�8�:�:r2)r�)FNNN��N�F�r�)!rGrHrIrJr_r�r�rr�rr�rr�rrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r{rrZr�)r�s@r0r�r�s����
�
��	��	��$��$�
�^�^�#��#��$��$�
�^�^�'��'��+��+��(��(��,��,�

�(�5�H�	H�
�5�%�
-�*�
&�$�'�9�&�
;�;r2r�c�X�\\VP4PVnV#)z*Copy docstring from SSLObject to SSLSocket)�getattrr�rGr_)�funcs&r0�_sslcopydocr�s���9�d�m�m�4�<�<�D�L��Kr2c�aa�]tRtRtoRtRt]R/V3Rll4t]]	R44t
]
PR4t
]]	R44t]PR4t]]	R	44t
R
tR0RltRtR1R
ltRt]	R2Rl4t]	R4t]	R4t]	R4t]	R4t]	R4t]	R4t]	R4tR3V3RlltR0V3RlltRtR3V3RlltR4V3RlltR5V3Rllt R6V3Rllt!R5V3Rllt"R6V3Rllt#R t$R!t%]	R"4t&V3R#lt']	R$4t(]	R%4t)V3R&lt*]	R2R'l4t+V3R(lt,R)t-R*t.V3R+lt/]	R7R,l4t0]	R-4t1R.t2Vt3V;t4#)8�	SSLSocketi�z�This class implements a subtype of socket.socket that wraps
the underlying OS socket in an SSL context when necessary, and
provides read and write methods over that channel. c�F�\VPPR24h)zX does not have a public constructor. Instances are returned by SSLContext.wrap_socket().r�r�s&*,r0r��SSLSocket.__init__�s)����~�~�&�&�'�((�
)�
�	
r2c�&<�VP\\4\8wd\	R4hV'd#V'd\R4hVe\R4hVP'dV'g\R4hVP4p\VPVPVPVP4R7p	VP!V3/V	Bp
\\V
`B!R
/V	BVP#4WjnWznRV
nRV
nW*nVP/V4V
nW:nWJnV
P74RpT
PMT4Y�n'T'drT
P$PQY�T
P0Y�P&R
7T
nT'd3T
P4pTR8Xd\R4hT
PS4T
# \8d�pTP:\:P<8wdhRpT
P?4p
T
PAR4T
PC^4pMJ \8d=pTP:\:P<\:PD39dhRpRp?MRp?ii;iT
PAT
4T'd1R	p\GXP:T4pTTn$RTn%Th Rpi;iRp?EL�Rp?ii;i T
PU4h \8dhi;i;i)z!only stream sockets are supportedz4server_hostname can only be specified in client modeNz,session can only be specified in client modez'check_hostname requires server_hostname)�family�type�proto�filenoFTr2z5Closed before TLS handshake with data in recv buffer.�r�r�zHdo_handshake_on_connect should not be specified for non-blocking socketsrF)+�
getsockoptr�r�r��NotImplementedErrorr�r��
gettimeout�dictrrrrr�r�r
r��detach�_context�_session�_closedr�rr
rrr�getpeernamer��errno�ENOTCONN�getblocking�setblocking�recv�EINVALr
�reason�library�
settimeout�
_connected�_wrap_socketr��close)r�rrrrrrr�sock_timeoutrr�	connected�e�blocking�notconn_pre_handshake_datar&� notconn_pre_handshake_data_error�timeoutr�s&&&&&&&&          �r0r�SSLSocket._create�s�����?�?�:�w�/�;�>�%�&I�J�J��� �"2�3�3��"� �"/�0�0��!�!�!�/��F�G�G����(����;�;�T�Y�Y�d�j�j��;�;�=�
���{�{�3�)�&�)��
�i��'�1�&�1����
�C	�#�M�#�M� �D�L��D�L�*��#*�#;�#;�O�#L�D� �+B�(�(<�%�#
!�� � �"�D!�	��O�O�L�)�'�O��#�}�}�9�9��t�';�';��
�
� :� ���+�"�o�o�/�G��#�~�(�)s�t�t��%�%�'����o�
@��7�7�e�n�n�,��!�	��+�+�-��� � ��'�
5�
26���1��.���5��w�w�u�~�~�u�|�|�&D�D��14�.��	5��
� � ��*�-�U�F�7?�����7P�4�>D�4�;�?C�4�<�@�>�>��<@�8��.��%
@��b	�
��
�
��
���
���
�s��AK+�G)�BK+�)K(�4AK#�8I
�	K#�
J�2J�K#�J�K#�-&K#�K�K�K#�K+�#K(�(K+�+L�.K?�>L�?L
�
L�L
�
Lc��VP#r1)rrps&r0r�SSLSocket.context=s���}�}�r2c�2�WnWPnR#r1)rr�rr�s&&r0rr5Bs���
�"���r2c�N�VPeVPP#R#r1r�rps&r0r�SSLSocket.sessionGs#���<�<�#��<�<�'�'�'�$r2c�R�WnVPeWPnR#R#r1)rr�rr�s&&r0rr8Ms ���
��<�<�#�#*�L�L� �$r2c�N�VPeVPP#R#r1r�rps&r0r��SSLSocket.session_reusedSs#���<�<�#��<�<�.�.�.�$r2c�N�\RVPP,4h)zCan't dup() %s instances)rr�rGrps&r0�dup�
SSLSocket.dupYs$��!�"<�"&�.�.�"9�"9�#:�;�	;r2c��R#r1rF)r�msgs&&r0�_checkClosed�SSLSocket._checkClosed]s��r2c�N�VP'gVP4R#R#r1)r)rrps&r0�_check_connected�SSLSocket._check_connectedas������

����r2c�n�VP4VPf\R4hVeVPPW4#VPPV4# \dEpTP
^,\8Xd#TP'dTeRp?^#Rp?R#hRp?ii;i)zGRead up to LEN bytes and return them.
Return zero-length string on EOF.Nz'Read on closed or unwrapped SSL socket.r2)rAr�r�r�r
r�
SSL_ERROR_EOFr)rr&r��xs&&& r0r��SSLSocket.readis���	
�����<�<���F�G�G�	��!��|�|�(�(��5�5��|�|�(�(��-�-���	��v�v�a�y�M�)�d�.G�.G�.G��%�����	�s)�A%�
A%�%B4�0-B/�B/�.B/�/B4c��VP4VPf\R4hVPPV4#)z`Write DATA to the underlying SSL channel.  Returns
number of bytes of DATA actually transmitted.z(Write on closed or unwrapped SSL socket.)rAr�r�r�r�s&&r0r��SSLSocket.write~s;��	
�����<�<���G�H�H��|�|�!�!�$�'�'r2c�x�VP4VP4VPPV4#r1)rArDr�r�r�s&&r0r��SSLSocket.getpeercert�s/�����������|�|�'�'��4�4r2c��VPP4pVf.#VUu.uF!q"P\P4NK#	up#uupir1r�r�s&  r0r��SSLSocket.get_verified_chain�sE�����/�/�1���=��I�AF�G���!�!�$�"3�"3�4��G�G��Gr�c��VPP4pVf.#VUu.uF!q"P\P4NK#	up#uupir1r�r�s&  r0r��SSLSocket.get_unverified_chain�sE�����1�1�3���=��I�AF�G���!�!�$�"3�"3�4��G�G��Gr�c�`�VP4\P!R\^R7R#)r"r#N)rAr�r�r�rps&r0r��SSLSocket.selected_npn_protocol�s(�������
�
�5���	
�
r2c��VP4VPe\P'gR#VPP	4#r1)rAr�rKrr�rps&r0r�� SSLSocket.selected_alpn_protocol�s6�������<�<��t�}�}�}���<�<�6�6�8�8r2c�v�VP4VPfR#VPP4#r1)rAr�r�rps&r0r��SSLSocket.cipher�s.�������<�<����<�<�&�&�(�(r2c�v�VP4VPfR#VPP4#r1)rAr�r�rps&r0r��SSLSocket.shared_ciphers�s.�������<�<����<�<�.�.�0�0r2c�v�VP4VPfR#VPP4#r1)rAr�r�rps&r0r��SSLSocket.compression�s.�������<�<����<�<�+�+�-�-r2c��<�VP4VPe?V^8wd\RVP,4hVPP	V4#\
SV`W4#)Nz3non-zero flags not allowed in calls to send() on %s)rAr�r�r�r�r��send)rr~r�r�s&&&�r0r]�SSLSocket.send�sb��������<�<�#���z� �I��N�N�#�$�$��<�<�%�%�d�+�+��7�<��,�,r2c�<�VP4VPe\RVP,4hVf\SV`W4#\SV`WV4#)Nz%sendto not allowed on instances of %s)rAr�r�r�r��sendto)rr~�
flags_or_addrr�r�s&&&&�r0r`�SSLSocket.sendto�sZ��������<�<�#��D�!�^�^�,�-�
-�
�\��7�>�$�6�6��7�>�$�t�<�<r2c�:�\RVP,4h)z&sendmsg not allowed on instances of %s�rr�r�s&*,r0�sendmsg�SSLSocket.sendmsg�s ��"�"J�"&�.�.�#1�2�	2r2c	��<�VP4VPe�V^8wd\RVP,4h^p\	V4;_uu_4qDPR4;_uu_4p\
V4pW68dVPWSR4pW7,
pK#RRR4RRR4R#\SV`%W4# +'giL);i +'giR#;i)Nz6non-zero flags not allowed in calls to sendall() on %s�B)
rAr�r�r��
memoryview�castr&r]r��sendall)	rr~r�r��view�	byte_view�amountr�r�s	&&&     �r0rk�SSLSocket.sendall�s���������<�<�#���z� �L��N�N�#�$�$��E��D�!�!�T�9�9�S�>�>�Y��Y����n��	�	�)�F�"3�4�A��J�E�%�,:�!�!��7�?�4�/�/�
,:�>��!�!�!�s$�C�1/C	�!C�C
�
C�C&	c�d<�VPeVPWV4#\SV`
WV4#)zuSend a file, possibly by using os.sendfile() if this is a
clear-text socket.  Return the total number of bytes sent.
)r��_sendfile_use_sendr��sendfile)r�file�offsetr�r�s&&&&�r0rr�SSLSocket.sendfile�s6����<�<�#��*�*�4��?�?��7�#�D�%�8�8r2c��<�VP4VPe5V^8wd\RVP,4hVP	V4#\
SV`W4#)Nz3non-zero flags not allowed in calls to recv() on %s)rAr�r�r�r�r�r$�r�buflenr�r�s&&&�r0r$�SSLSocket.recv�s\��������<�<�#���z� �I��N�N�#�$�$��9�9�V�$�$��7�<��.�.r2c�h<�VP4Vf:Ve4\V4;_uu_4pVPpRRR4V'gRpMRpVPe5V^8wd\	RVP
,4hVP
W!4#\SV`!WV4# +'giLo;i)Nrz8non-zero flags not allowed in calls to recv_into() on %s)	rAri�nbytesr�r�r�r�r��	recv_into)rr�r{r�rlr�s&&&& �r0r|�SSLSocket.recv_into	s���������>��!���'�'�4�!�[�[�F�(��!�F�����<�<�#���z� �L��.�.�!�"�"��9�9�V�,�,��7�$�V�U�;�;�(�'�s�
B!�!B1	c�<�VP4VPe\RVP,4h\SV`W4#)Nz'recvfrom not allowed on instances of %s)rAr�r�r�r��recvfromrws&&&�r0r�SSLSocket.recvfromsG��������<�<�#��F�!�^�^�,�-�
-��7�#�F�2�2r2c�<�VP4VPe\RVP,4h\SV`WV4#)Nz,recvfrom_into not allowed on instances of %s)rAr�r�r�r��
recvfrom_into)rr�r{r�r�s&&&&�r0r��SSLSocket.recvfrom_into$sI��������<�<�#��K�!�^�^�,�-�
-��7�(���?�?r2c�:�\RVP,4h)z&recvmsg not allowed on instances of %srdr�s&*,r0�recvmsg�SSLSocket.recvmsg,s��!�"J�"&�.�.�#1�2�	2r2c�:�\RVP,4h)z+recvmsg_into not allowed on instances of %srdr�s&*,r0�recvmsg_into�SSLSocket.recvmsg_into0s ��!�#'�)-���#8�9�	9r2c�v�VP4VPeVPP4#^#r1)rAr�r�rps&r0r��SSLSocket.pending4s.�������<�<�#��<�<�'�'�)�)�r2c�T<�VP4RVn\SV`
V4R#r1)rAr�r�r�)r�howr�s&&�r0r��SSLSocket.shutdown<s#����������
����r2c��VP'd$VPP4pRVnV#\R\V4,4h)N�No SSL wrapper around )r�r�r�r
)r�ss& r0r��SSLSocket.unwrapAs>���<�<�<����%�%�'�A��D�L��H��5��D�	�A�B�Br2c��VP'dVPP4#\R\V4,4h)r�)r�rr�r
rps&r0r�&SSLSocket.verify_client_post_handshakeJs3���<�<�<��<�<�<�<�>�>��5��D�	�A�B�Br2c�2<�RVn\SV`	4R#r1)r�r��_real_closerXs&�r0r��SSLSocket._real_closeQs������
���r2c�
�VP4VP4pVR8XdV'dVPR4VPP	4VPV4R# TPT4i;i)rN)rDrr(r�r�)r�blockr2s&& r0r��SSLSocket.do_handshakeUs]�������/�/�#��	%��#�~�%�����%��L�L�%�%�'��O�O�G�$��D�O�O�G�$�s�A/�+A/�/Bc�<�VP'd\R4hVP'gVPe\R4hVPPVRVPWPR7VnV'd\SV`%V4pMRp\SV`)V4V'g*RVnVP'dVP4V# \\3d
RTnhi;i)z!can't connect in server-side modeNz/attempt to connect already-connected SSLSocket!FrT)rr�r)r�rr*rrr��
connect_ex�connectrr�r�)rr�r��rcr�s&&& �r0�
_real_connect�SSLSocket._real_connect`s���������@�A�A��?�?�?�d�l�l�6��N�O�O��|�|�0�0��%��-�-��
�
�1�
���
	���W�'��-��������%��"&����/�/�/��%�%�'��I����$�	��D�L��	�s�0C�4C�
C�C9c�*�VPVR4R#)�IConnects to remote ADDR, and then wraps the connection in
an SSL channel.FN�r��rr�s&&r0r��SSLSocket.connectzs��	
���4��'r2c�&�VPVR4#)r�Tr�r�s&&r0r��SSLSocket.connect_exs���!�!�$��-�-r2c�<�\SV`4wrVPPVVPVP
RR7pW3#)z�Accepts a new connection from a remote client, and returns
a tuple containing that new connection wrapped with a server-side
SSL channel, and the address of the remote client.T)rrr)r��acceptrrrr)r�newsockr�r�s&  �r0r��SSLSocket.accept�sM���
���(�
���,�,�*�*�7�,0�,H�,H�)-�)B�)B� $�+�&���}�r2c��VPeVPPV4#V\9d\RP	V44hR#)Nz({0} channel binding type not implemented)r�r��CHANNEL_BINDING_TYPESr�r�r�s&&r0r��SSLSocket.get_channel_binding�sJ���<�<�#��<�<�3�3�G�<�<��3�3� �>�E�E�g�N���r2c�V�VPeVPP4#R#r1r�rps&r0r{�SSLSocket.version�s"���<�<�#��<�<�'�'�)�)�r2)	rr)rrr�rrrr)FTTNNNr1rr)�)r�N)rr�)Nr�r)5rGrHrIrJr_r�r�rr�rrr�rr�r=rArDr�r�r�r�r�r�r�r�r�r�r]r`rerkrrr$r|rr�r�r�r�r�r�rr�r�r�r�r�r�r�r{rZr�r�r�s@@r0r
r
�s>����;�
��\��\�|������
�^�^�#��#���(���(�
�^�^�+��+�
��/���/�;�
���*(��5��5�
�H��H��H��H������9��9��)��)��1��1��.��.�	-�=�2�0� 9�	/�<�&3�@�2�9������
�C��C��C��C���%��%��4(�
.�

���������r2r
c�"�^RIHp^RIHpR
pRpVP	VR,P44^,pV!VR,V4pV!V^,V3VR,,4# \d\
RT:RT:R	24hi;i)aqReturn the time in seconds since the Epoch, given the timestring
representing the "notBefore" or "notAfter" date from a certificate
in ``"%b %d %H:%M:%S %Y %Z"`` strptime format (C locale).

"notBefore" or "notAfter" dates must use UTC (RFC 5280).

Month is one of: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
UTC should be specified as GMT (see ASN1_TIME_print())
)�strptime)�timegmz %d %H:%M:%S %Y GMT:N�N:r�NN:��Nz
time data z does not match format "%b�")�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�Dec)�timer��calendarr��index�titler�)�	cert_timer�r��months�time_format�month_number�tts&      r0�cert_time_to_secondsr��s������F�(�K�
7��|�|�I�b�M�$7�$7�$9�:�Q�>���i��m�[�
1���r�!�u�l�+�b��g�5�6�6���F��-6��E�F�	F�F�s�-A.�. Bz-----BEGIN CERTIFICATE-----z-----END CERTIFICATE-----c� �\\P!V4RR4p\.pT\	^\V4^@4Uu.uF
q1W3^@,NK	up,
pVP
\R,4RPV4#uupi)zWTakes a certificate in binary DER format and returns the
PEM version of it as a string.�ASCII�strict�
)	r
�base64�standard_b64encode�
PEM_HEADER�ranger&r'�
PEM_FOOTER�join)�der_cert_bytes�f�ss�is&   r0�DER_cert_to_PEM_certr��sv��	�F�%�%�n�5�w��I�A�
��B��e�A�s�1�v�r�2�
3�2��Q��t�9�2�
3�3�B��I�I�j�4�� ��9�9�R�=���4s�Bc��VP\4'g\R\,4hVP4P	\
4'g\R\
,4hVP4\
\4\
\
4)p\P!VPRR44#)zdTakes a certificate in ASCII PEM format and returns the
DER-encoded version of it as a byte sequencez(Invalid PEM encoding; must start with %sz&Invalid PEM encoding; must end with %sr�r�)
r-r�r��strip�endswithr�r&r��decodebytesr)�pem_cert_string�ds& r0�PEM_cert_to_DER_certr��s����%�%�j�1�1��C�%�&�'�	'�� � �"�+�+�J�7�7��A�%�&�'�	'������J���Z��0@�A�A����a�h�h�w��9�:�:r2c	�L�VwrEVe\pM\p\VVVR7p\WR7;_uu_4pVP	W�R7;_uu_4p	V	PR4p
RRR4RRR4\
X
4# +'giL#;i +'giL.;i)a)Retrieve the certificate from the server at the specified address,
and return it as a PEM-encoded string.
If 'ca_certs' is specified, validate the server cert against it.
If 'ssl_version' is specified, use it in the connection attempt.
If 'timeout' is specified, use it in the connection attempt.
N)r�r�)r2)rT)r�r��_create_stdlib_contextr�rr�r�)r��ssl_version�ca_certsr2�host�portr�rr�sslsock�dercerts&&&&       r0�get_server_certificater��s����J�D���!�	��	�$�[�/8�,4�6�G�
�4�	1�	1�T�
�
 �
 ��
 �
<�
<���)�)�$�/�G�=�
2� ��(�(�=�
<��
2�	1�s#�B�B	�%B�B
�B�B#	c�.�\PVR4#)z	<unknown>)�_PROTOCOL_NAMESr�)�
protocol_codes&r0�get_protocol_namer��s�����}�k�:�:r2r1)or_rPr��collectionsr�enumr�_Enumr�_IntEnumr�_IntFlagrrKrrr	r
rrr
rrrrrrrr�rr�rrrr�ImportErrorrrrrrrr r!r"r#r$r%r&r'�	_convert_rGr(rr+�__members__�itemsr�r	�_SSLv2_IF_EXISTSrEr\rgr�rQr�r�r�r�r�r�r�r�r�r�r r�r��socket_errorr�r��HAS_NEVER_CHECK_COMMON_NAME�_RESTRICTED_SERVER_CIPHERSr�r�r�r�r�r�r�r�r�r�r�r�r��_create_default_https_contextr�r�rr
rrr�r�r�r�r�r�r�r�)r/r`s00r0�<module>rs���X�t�	�"�H�H���N�N�3�3����:�2�2�	������8�����(�K���
	���
�x�'���
	�����6���
	����h�.���
	����8�+���
	����(�)���
0:�/F�/F�F��*�,�2<�2H�2H�2N�2N�2P�Q�2P�;�4�5�;�2P�Q���:�'7��>���h��5�5��5��h�������h��&"�&"��&"�R�h�� � �� �:�<�<�7��1�9�9�?�?��
�����%���%�d�,J�K��.��+��.>�b D�F	� � 4����&�@�*�]�,H�I�@�*&�k�5�&�AG��AG�H$+�#6�#6�.�$�.�"&�.�/3�.�`4�9�4�*/�4�9@�9L�9L�4�$(�4�26�4�#'�4�04�4�=A�4�n!7��4��q;�q;�h�N��N�d'�
��&�
��
7�<+�
�
(�
��;�.A�$(�2I�)�,;��Q,�	��	��TRs�J;�
K	�;K�K