+
     wéjŽ†  ã                   óh  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^RIHt ^RIHt ^RIHt ^RIHtHtHt ^RIHtHtHtHtHtHt  ^ RI	Ht R
R.t#Rt$]PH                  t%]PL                  PN                  t(]PR                  ! 4       t*]PV                  ! 4       t,Rt-]P\                  ]P^                  ]P`                  ]Pb                  ]Pd                  ]Pf                  ]Ph                  ]Pj                  ]Pl                  ]Pn                  ]Pp                  ]Pr                  ]Pt                  ]Pv                  ]Px                  ]Pz                  ]P|                  ]P~                  ]P€                  ]P‚                  ]P„                  ]P†                  ]Pˆ                  ]PŠ                  ]PŒ                  ]PŽ                  ]P�                  ]P’                  ]P”                  ]P–                  .tL]Pš                  ]Pœ                  ]Pž                  3]]Pœ                  ]Pž                  3/tP]Q! ]
R4      '       d&   ]P¤                  ]P¤                  3]P]
P¦                  &   ]Q! ]
R4      '       d&   ]P¨                  ]P¨                  3]P]
Pª                  &   ]Q! ]
R4      '       d&   ]Pœ                  ]Pœ                  3]P]
P¬                  &   ]Q! ]
R4      '       d&   ]P®                  ]P®                  3]P]
P°                  &   ]Q! ]
R4      '       d&   ]Pž                  ]Pž                  3]P]
P²                  &   R tZR t[R t\R t]]P¼                  ! ]\4      t_]PÀ                  ! ]]4      ta ! R R]b4      tc]'       d   RR ltdMRR ltd]d]cnd         ! R R]b4      teR#   ]  d    Rt^R	I!H"t"  ELLi ; i)aê	  
SecureTranport support for urllib3 via ctypes.

This makes platform-native TLS available to urllib3 users on macOS without the
use of a compiler. This is an important feature because the Python Package
Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
that ships with macOS is not capable of doing TLSv1.2. The only way to resolve
this is to give macOS users an alternative solution to the problem, and that
solution is to use SecureTransport.

We use ctypes here because this solution must not require a compiler. That's
because pip is not allowed to require a compiler either.

This is not intended to be a seriously long-term solution to this problem.
The hope is that PEP 543 will eventually solve this issue for us, at which
point we can retire this contrib module. But in the short term, we need to
solve the impending tire fire that is Python on Mac without this kind of
contrib module. So...here we are.

To use this module, simply import and inject it::

    import pip._vendor.urllib3.contrib.securetransport as securetransport
    securetransport.inject_into_urllib3()

Happy TLSing!

This code is a bastardised version of the code found in Will Bond's oscrypto
library. An enormous debt is owed to him for blazing this trail for us. For
that reason, this code should be considered to be covered both by urllib3's
license and by oscrypto's:

.. code-block::

    Copyright (c) 2015-2016 Will Bond <will@wbond.net>

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.
)Úabsolute_importN)Úutil)Úsix)ÚPROTOCOL_TLS_CLIENT)ÚCoreFoundationÚSecurityÚSecurityConst)Ú_assert_no_errorÚ_build_tls_unknown_ca_alertÚ_cert_array_from_pemÚ_create_cfstring_arrayÚ_load_client_cert_chainÚ_temporary_keychain)Ú_fileobject©Úbackport_makefileÚinject_into_urllib3Úextract_from_urllib3Ti @  ÚPROTOCOL_SSLv2ÚPROTOCOL_SSLv3ÚPROTOCOL_TLSv1ÚPROTOCOL_TLSv1_1ÚPROTOCOL_TLSv1_2c                 óæ   € \         \        n        \         \        P                  n        \        \        n        \        \        P                  n        R\        n        R\        P                  n        R# )z?
Monkey-patch urllib3 with SecureTransport-backed SSL-support.
TN)ÚSecureTransportContextr   Ú
SSLContextÚssl_ÚHAS_SNIÚIS_SECURETRANSPORT© ó    ÚbD:\Novelx\Nexus_chitfund_web\venv\Lib\site-packages\pip/_vendor/urllib3/contrib/securetransport.pyr   r   ¼   s>   € ô -„D„OÜ1„D‡I�IÔÜ„D„LÜ„D‡I�IÔØ"„DÔØ#'„D‡I�IÖ r    c                 óæ   € \         \        n        \         \        P                  n        \        \        n        \        \        P                  n        R\        n        R\        P                  n        R# )z6
Undo monkey-patching by :func:`inject_into_urllib3`.
FN)Úorig_util_SSLContextr   r   r   Úorig_util_HAS_SNIr   r   r   r    r!   r   r   È   s>   € ô +„D„OÜ/„D‡I�IÔÜ$„D„LÜ)„D‡I�IÔØ#„DÔØ#(„D‡I�IÖ r    c                óæ  € Rp \         P                  V 4      pVf   \        P                  # VP                  pV^ ,          pVP                  4       pRp^ p W…8  d½   Ve   V^ 8¼  dB   \        P                  ! WF4      '       g&   \        P                  ! \        P                  R4      hWX,
          p	\        P                  V	,          P                  W,           4      p
VP                  W©4      pW‹,          pV'       d   K©  V'       g   \        P                  # M W‚^ &   W…8w  d   \        P&                  # ^ #   \        P                   dt   pTP                  pTeZ   T\        P                  8w  dE   Y‚^ &   T\        P                   8X  g   T\        P"                  8X  d   \        P$                  u Rp?# h  Rp?LŸRp?ii ; i  \(         d%   pTe   YÃn        \        P                  u Rp?# Rp?ii ; i)zg
SecureTransport read callback. This is called by ST to request that data
be returned from the socket.
Nú	timed out)Ú_connection_refsÚgetr   ÚerrSSLInternalÚsocketÚ
gettimeoutr   Úwait_for_readÚerrorÚerrnoÚEAGAINÚctypesÚc_charÚfrom_addressÚ	recv_intoÚerrSSLClosedGracefulÚ
ECONNRESETÚEPIPEÚerrSSLClosedAbortÚerrSSLWouldBlockÚ	ExceptionÚ
_exception)Úconnection_idÚdata_bufferÚdata_length_pointerÚwrapped_socketÚbase_socketÚrequested_lengthÚtimeoutr-   Ú
read_countÚ	remainingÚbufferÚ
chunk_sizeÚes   &&&          r!   Ú_read_callbackrG   Ô   s   € ð
 €Nð.,Ü)×-Ñ-¨mÓ<ˆØÒ!Ü ×/Ñ/Ð/Ø$×+Ñ+ˆà.¨qÕ1Ðà ×+Ñ+Ó-ˆØˆØˆ
ð	ØÔ/Ø’? g°¤lÜ×-Ò-¨k×CÒCÜ$Ÿlšl¬5¯<©<¸ÓEÐEà,Õ9�	Ü Ÿ-™-¨)Õ3×AÑAØÕ,ó�ð )×2Ñ2°6ÓE�
ØÕ(�
ß!‘zß%Ü,×AÑAÐAØð 0ð0 ",˜AÑàÔ)Ü ×1Ñ1Ð1áøô —‘ô 	Ø—G‘GˆEàÒ  U¬e¯l©lÔ%:Ø)3 AÑ&ØœE×,Ñ,Ô,°¼¿¹Ô0DÜ(×:Ñ:Õ:Øÿøð	ûô ô ,ØÒ%Ø()Ô%Ü×+Ñ+Õ+ûð,úsl   „(G ­)G ÁB$D6 Ä D6 ÄD6 ÄG Ä6F>ÅA"F9Æ-F>Æ.G Æ3F9Æ4G Æ9F>Æ>G ÇG0ÇG+Ç%G0Ç+G0c                óp  € Rp \         P                  V 4      pVf   \        P                  # VP                  pV^ ,          p\
        P                  ! W4      pVP                  4       pRp^ p	 W•8  dl   Ve   V^ 8¼  dB   \        P                  ! WG4      '       g&   \        P                  ! \        P                  R4      hVP                  V4      p
Wš,          p	WjR pKq   W’^ &   W•8w  d   \        P"                  # ^ #   \        P                   dt   pTP                  pTeZ   T\        P                  8w  dE   Y’^ &   T\        P                  8X  g   T\        P                  8X  d   \        P                   u Rp?# h  Rp?LŸRp?ii ; i  \$         d%   pTe   Y³n        \        P                  u Rp?# Rp?ii ; i)zl
SecureTransport write callback. This is called by ST to request that data
actually be sent on the network.
Nr&   )r'   r(   r   r)   r*   r0   Ú	string_atr+   r   Úwait_for_writer-   r.   r/   Úsendr5   r6   r7   r8   r9   r:   )r;   r<   r=   r>   r?   Úbytes_to_writeÚdatarA   r-   ÚsentÚ
chunk_sentrF   s   &&&         r!   Ú_write_callbackrP     s{  € ð
 €Nð*,Ü)×-Ñ-¨mÓ<ˆØÒ!Ü ×/Ñ/Ð/Ø$×+Ñ+ˆà,¨QÕ/ˆÜ×Ò Ó<ˆà ×+Ñ+Ó-ˆØˆØˆð	ØÔ'Ø’? g°¤lÜ×.Ò.¨{×DÒDÜ$Ÿlšl¬5¯<©<¸ÓEÐEØ(×-Ñ-¨dÓ3�
ØÕ"�ð ˜KÐ(’ð (ð& "&˜AÑàÔ!Ü ×1Ñ1Ð1áøô —‘ô 	Ø—G‘GˆEàÒ  U¬e¯l©lÔ%:Ø)- AÑ&ØœE×,Ñ,Ô,°¼¿¹Ô0DÜ(×:Ñ:Õ:Øÿøð	ûô ô ,ØÒ%Ø()Ô%Ü×+Ñ+Õ+ûð,ús`   „(F ­?F Á-A1C; ÃF Ã;FÄA"E>Å2FÅ3F Å8E>Å9F Å>FÆF ÆF5ÆF0Æ*F5Æ0F5c                   óÈ   a € ] tR tRt o RtR t]P                  R 4       tR t	R t
R tR tR	 tR
 tR tR tRR ltR tR tR tR tR tR tRR ltR tR tR tRtV tR# )ÚWrappedSocketiE  z¢
API-compatibility wrapper for Python's OpenSSL wrapped socket object.

Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage
collector of PyPy.
c                óè   € Wn         R V n        ^ V n        RV n        R V n        R V n        R V n        R V n        V P                   P                  4       V n	        V P                   P                  ^ 4       R # )NF)r*   ÚcontextÚ_makefile_refsÚ_closedr:   Ú	_keychainÚ_keychain_dirÚ_client_cert_chainr+   Ú_timeoutÚ
settimeout)Úselfr*   s   &&r!   Ú__init__ÚWrappedSocket.__init__M  sc   € ØŒØˆŒØˆÔØˆŒØˆŒØˆŒØ!ˆÔØ"&ˆÔð Ÿ™×.Ñ.Ó0ˆŒØ�‰×Ñ˜qÖ!r    c              #  óŠ   "  € RV n         Rx € V P                   e&   V P                   Ruqn         V P                  4        VhR# 5i)a-  
A context manager that can be used to wrap calls that do I/O from
SecureTransport. If any of the I/O callbacks hit an exception, this
context manager will correctly propagate the exception after the fact.
This avoids silently swallowing those exceptions.

It also correctly forces the socket closed.
N)r:   Úclose)r\   Ú	exceptions   & r!   Ú_raise_on_errorÚWrappedSocket._raise_on_error_  s@   é € ð ˆŒó
 	Ø�?‰?Ò&Ø)-¯©¸$Ð&ˆI”Ø�J‰JŒLØˆOñ 'ùs   ‚AAc                óÐ   € \         P                  \        \        4      ,          ! \         p\         P                  ! V P
                  V\        \        4      4      p\        V4       R# )a  
Sets up the allowed ciphers. By default this matches the set in
util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done
custom and doesn't allow changing at this time, mostly because parsing
OpenSSL cipher strings is going to be a freaking nightmare.
N)r   ÚSSLCipherSuiteÚlenÚCIPHER_SUITESÚSSLSetEnabledCiphersrT   r	   )r\   ÚciphersÚresults   &  r!   Ú_set_ciphersÚWrappedSocket._set_cipherst  sH   € ô ×*Ñ*¬S´Ó-?Ö?Ä-ÐPˆÜ×.Ò.Ø�L‰L˜'¤3¤}Ó#5ó
ˆô 	˜Ö r    c                óì   € V'       g   R# \        V4      p \        P                  ! V P                  V4      p\	        V4       \
        P                  ! V4       R#   \
        P                  ! T4       i ; i)z,
Sets up the ALPN protocols on the context.
N)r   r   ÚSSLSetALPNProtocolsrT   r	   r   Ú	CFRelease)r\   Ú	protocolsÚprotocols_arrrj   s   &&  r!   Ú_set_alpn_protocolsÚ!WrappedSocket._set_alpn_protocols�  sT   € ÷ ÙÜ.¨yÓ9ˆð	4Ü×1Ò1°$·,±,ÀÓNˆFÜ˜VÔ$ä×$Ò$ ]Ö3øŒN×$Ò$ ]Õ3ús   —,A ÁA3c                ó>  € V'       g   R# \         P                  \         P                  3p V P                  V4      pWC9   d   R# RV3,          p\        V P                  4       4      pV P                  P                  V4       \        P                  ! R^^ 4      pV P                  P                  \        P                  \        P                  V4       V P                  4        \        P                   ! RV,          4      h  \         d   pRT: 2p Rp?LÈRp?ii ; i)zÖ
Called when we have set custom validation. We do this in two cases:
first, when cert validation is entirely disabled; and second, when
using a custom trust DB.
Raises an SSLError if the connection is not trusted.
Nzerror code: %dzexception: Úiizcertificate verify failed, %s)r   ÚkSecTrustResultUnspecifiedÚkSecTrustResultProceedÚ_evaluate_trustr9   r
   Úversionr*   ÚsendallÚstructÚpackÚ
setsockoptÚ
SOL_SOCKETÚ	SO_LINGERr`   ÚsslÚSSLError)	r\   ÚverifyÚtrust_bundleÚ	successesÚtrust_resultÚreasonrF   ÚrecÚoptss	   &&&      r!   Ú_custom_validateÚWrappedSocket._custom_validateŽ  sá   € ÷ Ùô ×4Ñ4Ü×0Ñ0ð
ˆ	ð	,Ø×/Ñ/°Ó=ˆLØÔ(ÙØ%¨¨Õ7ˆFô *¨$¯,©,«.Ó9ˆØ�‰×Ñ˜CÔ ô �{Š{˜4  AÓ&ˆØ�‰×Ñœv×0Ñ0´&×2BÑ2BÀDÔIØ�
‰
ŒÜ�lŠlÐ:¸VÕCÓDÐDøô õ 	,â()Ð+�Fûð	,ús   ¬D Á
D ÄDÄDÄDc                óð  € \         P                  P                  V4      '       d.   \        VR 4      ;_uu_ 4       pVP	                  4       pRRR4       Rp\
        P                  ! 4       p \        V4      p\
        P                  ! V P                  \        P                  ! V4      4      p\        V4       V'       g   \        P                  ! R4      h\
        P                  ! WC4      p\        V4       \
        P                   ! VR4      p\        V4       \
        P"                  ! 4       p\
        P$                  ! V\        P                  ! V4      4      p\        V4       V'       d   \&        P(                  ! V4       Ve   \&        P(                  ! V4       VP*                  #   + '       g   i     ELd; i  T'       d   \&        P(                  ! T4       Te   \&        P(                  ! T4       i i ; i)ÚrbNzFailed to copy trust referenceT)ÚosÚpathÚisfileÚopenÚreadr   ÚSecTrustRefr   ÚSSLCopyPeerTrustrT   r0   Úbyrefr	   r€   r�   ÚSecTrustSetAnchorCertificatesÚ!SecTrustSetAnchorCertificatesOnlyÚSecTrustResultTypeÚSecTrustEvaluater   ro   Úvalue)r\   rƒ   ÚfÚ
cert_arrayÚtrustrj   r…   s   &&     r!   rx   ÚWrappedSocket._evaluate_trust±  sb  € ä�7‰7�>‰>˜,×'Ò'Ü�l D×)Ô)¨QØ Ÿv™v›x�÷ *ð ˆ
Ü×$Ò$Ó&ˆð	5ä-¨lÓ;ˆJô ×.Ò.¨t¯|©|¼V¿\º\È%Ó=PÓQˆFÜ˜VÔ$ßÜ—l’lÐ#CÓDÐDä×;Ò;¸EÓNˆFÜ˜VÔ$ä×?Ò?ÀÀtÓLˆFÜ˜VÔ$ä#×6Ò6Ó8ˆLÜ×.Ò.¨u´f·l²lÀ<Ó6PÓQˆFÜ˜VÔ$çÜ×(Ò(¨Ô/àÒ%Ü×(Ò(¨Ô4à×!Ñ!Ð!÷G *×)Ð)û÷: Ü×(Ò(¨Ô/àÒ%Ü×(Ò(¨Õ4ð &ús   ºF&Á+C7F: Æ&F7	Æ:;G5c
                ó¦  € \         P                  ! R\        P                  \        P                  4      V n        \         P                  ! V P
                  \        \        4      p
\        V
4       \        ;_uu_ 4        \        V 4      R,          pV\        9   d   V^,           R,          pK  V \        V&   RRR4       \         P                  ! V P
                  X4      p
\        V
4       V'       d^   \        V\        4      '       g   VP!                  R4      p\         P"                  ! V P
                  V\%        V4      4      p
\        V
4       V P'                  4        V P)                  V	4       \         P*                  ! V P
                  V4      p
\        V
4       \         P,                  ! V P
                  V4      p
\        V
4       V'       d   Ve<   \         P.                  ! V P
                  \        P0                  R4      p
\        V
4       V'       di   \3        4       w  V n        V n        \9        V P4                  Wg4      V n        \         P<                  ! V P
                  V P:                  4      p
\        V
4        V P?                  4       ;_uu_ 4        \         P@                  ! V P
                  4      p
V
\        PB                  8X  d   \D        PF                  ! R4      hV
\        PH                  8X  d   V PK                  W#4        RRR4       K–  \        V
4        RRR4       R#   + '       g   i     EL~; i  + '       g   i     KÑ  ; i)zy
Actually performs the TLS handshake. This is run automatically by
wrapped socket, and shouldn't be needed in user code.
Niÿÿÿzutf-8Tzhandshake timed out)&r   ÚSSLCreateContextr   ÚkSSLClientSideÚkSSLStreamTyperT   ÚSSLSetIOFuncsÚ_read_callback_pointerÚ_write_callback_pointerr	   Ú_connection_ref_lockÚidr'   ÚSSLSetConnectionÚ
isinstanceÚbytesÚencodeÚSSLSetPeerDomainNamerf   rk   rr   ÚSSLSetProtocolVersionMinÚSSLSetProtocolVersionMaxÚSSLSetSessionOptionÚ"kSSLSessionOptionBreakOnServerAuthr   rW   rX   r   rY   ÚSSLSetCertificaterb   ÚSSLHandshaker8   r*   rA   ÚerrSSLServerAuthCompletedr‰   )r\   Úserver_hostnamer‚   rƒ   Úmin_versionÚmax_versionÚclient_certÚ
client_keyÚclient_key_passphraseÚalpn_protocolsrj   Úhandles   &&&&&&&&&&  r!   Ú	handshakeÚWrappedSocket.handshakeÙ  sz  € ô$  ×0Ò0Ø”-×.Ñ.´×0LÑ0Ló
ˆŒô ×'Ò'Ø�L‰LÔ0Ô2Ió
ˆô 	˜Ô ÷
 "Ö!Ü˜“X 
Õ*ˆFØÔ,Ô,Ø  1�*¨
Õ2’Ø'+Ô˜VÑ$÷	 "ô ×*Ò*¨4¯<©<¸Ó@ˆÜ˜Ô ÷ Ü˜o¬u×5Ò5Ø"1×"8Ñ"8¸Ó"A�ä×2Ò2Ø—‘˜o¬s°?Ó/CóˆFô ˜VÔ$ð 	×ÑÔð 	× Ñ  Ô0ô ×2Ò2°4·<±<ÀÓMˆÜ˜Ô ä×2Ò2°4·<±<ÀÓMˆÜ˜Ô ÷ ˜Ò1Ü×1Ò1Ø—‘œm×NÑNÐPTóˆFô ˜VÔ$÷ Ü1DÓ1FÑ.ˆDŒN˜DÔ.Ü&=Ø—‘ ó'ˆDÔ#ô ×/Ò/°·±¸d×>UÑ>UÓVˆFÜ˜VÔ$àØ×%Ñ%×'Õ'Ü!×.Ò.¨t¯|©|Ó<�àœ]×;Ñ;Ô;Ü Ÿ.š.Ð)>Ó?Ð?Øœ}×FÑFÔFØ×)Ñ)¨&Ô?Ø÷ (Ñ'ô % VÔ,Ø÷ (Ñ'÷i "×!Ð!ú÷h (×'Ð'ús   Á=9L+ÊA3L?ÌL?Ì+L<	Ì?M	c                ó6   € V P                   P                  4       # ©N)r*   Úfileno©r\   s   &r!   r¿   ÚWrappedSocket.fileno6  s   € Ø�{‰{×!Ñ!Ó#Ð#r    c                ó¢   € V P                   ^ 8”  d   V ;P                   ^,          un         V P                  '       d   V P                  4        R# R# ©é    N)rU   rV   r`   rÀ   s   &r!   Ú_decref_socketiosÚWrappedSocket._decref_socketios:  s8   € Ø×Ñ Ô"Ø×Ò 1Õ$ÕØ�<�<ˆ<Ø�J‰JŽLñ r    c                ó^   € \         P                  ! V4      pV P                  W!4      pVR V pV# r¾   )r0   Úcreate_string_bufferr3   )r\   ÚbufsizrD   Ú
bytes_readrM   s   &&   r!   ÚrecvÚWrappedSocket.recv@  s1   € Ü×,Ò,¨VÓ4ˆØ—^‘^ FÓ3ˆ
Ø�k�zÐ"ˆØˆr    Nc           
     óÖ  € V P                   '       d   ^ # Vf   \        V4      p\        P                  V,          P	                  V4      p\        P
                  ! ^ 4      pV P                  4       ;_uu_ 4        \        P                  ! V P                  W\        P                  ! V4      4      pRRR4       X\        P                  8X  d5   VP                  ^ 8X  d   \        P                  ! R4      h VP                  # V\        P                   \        P"                  39   d   V P%                  4        VP                  # \'        V4       VP                  #   + '       g   i     L±; i)rÄ   Nzrecv timed out)rV   rf   r0   r1   Úfrom_bufferÚc_size_trb   r   ÚSSLReadrT   r”   r   r8   r™   r*   rA   r4   ÚerrSSLClosedNoNotifyr`   r	   )r\   rD   ÚnbytesÚprocessed_bytesrj   s   &&&  r!   r3   ÚWrappedSocket.recv_intoF  s  € à�<�<ˆ<ÙàŠ>Ü˜“[ˆFä—-‘- &Õ(×5Ñ5°fÓ=ˆÜ Ÿ/š/¨!Ó,ˆà×!Ñ!×#Õ#Ü×%Ò%Ø—‘˜f¬f¯lªl¸?Ó.KóˆF÷ $ð ”]×3Ñ3Ô3ð
 ×$Ñ$¨Ô)ä—n’nÐ%5Ó6Ð6ð *ð" ×$Ñ$Ð$ð Ü×.Ñ.Ü×.Ñ.ð
ô 
ð �J‰JŒLð ×$Ñ$Ð$ô	 ˜VÔ$ð ×$Ñ$Ð$÷= $×#ús   Á87EÅE(	c                ó   € Wn         R # r¾   ©rZ   )r\   rA   s   &&r!   r[   ÚWrappedSocket.settimeoutq  s   € ØŽr    c                ó   € V P                   # r¾   rÖ   rÀ   s   &r!   r+   ÚWrappedSocket.gettimeoutt  s   € Ø�}‰}Ðr    c           
     ó¼  € \         P                  ! ^ 4      pV P                  4       ;_uu_ 4        \        P                  ! V P
                  V\        V4      \         P                  ! V4      4      pRRR4       X\        P                  8X  d(   VP                  ^ 8X  d   \        P                  ! R4      h\        V4       VP                  #   + '       g   i     Lc; i)rÄ   Nzsend timed out)r0   rÏ   rb   r   ÚSSLWriterT   rf   r”   r   r8   r™   r*   rA   r	   )r\   rM   rÓ   rj   s   &&  r!   rK   ÚWrappedSocket.sendw  s›   € Ü Ÿ/š/¨!Ó,ˆà×!Ñ!×#Õ#Ü×&Ò&Ø—‘˜d¤C¨£I¬v¯|ª|¸OÓ/LóˆF÷ $ð
 ”]×3Ñ3Ô3¸×8MÑ8MÐQRÔ8Rä—.’.Ð!1Ó2Ð2ä˜VÔ$ð ×$Ñ$Ð$÷ $×#ús   ¯ACÃC	c                óz   € ^ pV\        V4      8  d)   V P                  WV\        ,            4      pW#,          pK8  R# rÃ   )rf   rK   ÚSSL_WRITE_BLOCKSIZE)r\   rM   Ú
total_sentrN   s   &&  r!   rz   ÚWrappedSocket.sendallˆ  s9   € Øˆ
Øœ3˜t›9Ô$Ø—9‘9˜T¨zÔ<OÕ/OÐPÓQˆDØÕŠJñ %r    c                ó°   € V P                  4       ;_uu_ 4        \        P                  ! V P                  4       R R R 4       R #   + '       g   i     R # ; ir¾   )rb   r   ÚSSLCloserT   rÀ   s   &r!   ÚshutdownÚWrappedSocket.shutdownŽ  s2   € Ø×!Ñ!×#Õ#Ü×Ò˜dŸl™lÔ+÷ $×#×#Ò#ús   ™!AÁA	c                ó‚  € V P                   ^8  Ed   RV n        V P                  '       d(   \        P                  ! V P                  4       RV n        V P
                  '       d(   \        P                  ! V P
                  4       RV n        V P                  '       do   \        P                  ! V P                  4       \        P                  ! V P                  4       \        P                  ! V P                  4       R;V n        V n        V P                  P                  4       # V ;P                   ^,          un         R# )é   TN)rU   rV   rT   r   ro   rY   rW   r   ÚSecKeychainDeleteÚshutilÚrmtreerX   r*   r`   rÀ   s   &r!   r`   ÚWrappedSocket.close’  sÓ   € à×Ñ Õ"ØˆDŒLØ�|�|ˆ|Ü×(Ò(¨¯©Ô6Ø#�”Ø×&×&Ð&Ü×(Ò(¨×)@Ñ)@ÔAØ*.�Ô'Ø�~�~ˆ~Ü×*Ò*¨4¯>©>Ô:Ü×(Ò(¨¯©Ô8Ü—’˜d×0Ñ0Ô1Ø6:Ð:�” Ô!3Ø—;‘;×$Ñ$Ó&Ð&à×Ò 1Õ$×r    c                ó2  € V'       g   \        R 4      h\        P                  ! 4       pRpRp \        P                  ! V P                  \
        P                  ! V4      4      p\        V4       V'       gB    V'       d   \        P                  ! V4       V'       d   \        P                  ! V4       R# R# \        P                  ! V4      pV'       gB    V'       d   \        P                  ! V4       V'       d   \        P                  ! V4       R# R# \        P                  ! V^ 4      pV'       g   Q h\        P                  ! V4      pV'       g   Q h\        P                  ! V4      p\        P                  ! V4      p	\
        P                  ! W˜4      pV'       d   \        P                  ! V4       V'       d   \        P                  ! V4       V#   T'       d   \        P                  ! T4       T'       d   \        P                  ! T4       i i ; i)z2SecureTransport only supports dumping binary certsN)Ú
ValueErrorr   r’   r“   rT   r0   r”   r	   r   ro   ÚSecTrustGetCertificateCountÚSecTrustGetCertificateAtIndexÚSecCertificateCopyDataÚCFDataGetLengthÚCFDataGetBytePtrrI   )
r\   Úbinary_formrœ   ÚcertdataÚ	der_bytesrj   Ú
cert_countÚleafÚdata_lengthr<   s
   &&        r!   ÚgetpeercertÚWrappedSocket.getpeercert¥  s€  € ÷( ÜÐQÓRÐRÜ×$Ò$Ó&ˆØˆØˆ	ð	0ä×.Ò.¨t¯|©|¼V¿\º\È%Ó=PÓQˆFÜ˜VÔ$ßà÷& Ü×(Ò(¨Ô2ßÜ×(Ò(¨Ö/ñ ô' "×=Ò=¸eÓDˆJßð ÷ Ü×(Ò(¨Ô2ßÜ×(Ò(¨Ö/ñ ô ×9Ò9¸%ÀÓCˆDßˆK�4ô  ×6Ò6°tÓ<ˆHßˆO�8ä(×8Ò8¸ÓBˆKÜ(×9Ò9¸(ÓCˆKÜ×(Ò(¨ÓBˆIçÜ×(Ò(¨Ô2ßÜ×(Ò(¨Ô/àÐø÷ Ü×(Ò(¨Ô2ßÜ×(Ò(¨Õ/ð ús+   ®AG Â7G ÄG Ä5G ÅAG Ç&HÇ>Hc                óš  € \         P                  ! 4       p\         P                  ! V P                  \        P
                  ! V4      4      p\        V4       VP                  \        P                  8X  d   \        P                  ! R 4      hVP                  \        P                  8X  d   R# VP                  \        P                  8X  d   R# VP                  \        P                  8X  d   R# VP                  \        P                  8X  d   R# VP                  \        P                   8X  d   R# \        P                  ! RV,          4      h)z(SecureTransport does not support TLS 1.3zTLSv1.2zTLSv1.1ÚTLSv1ÚSSLv3ÚSSLv2zUnknown TLS version: %r)r   ÚSSLProtocolÚSSLGetNegotiatedProtocolVersionrT   r0   r”   r	   r™   r   ÚkTLSProtocol13r€   r�   ÚkTLSProtocol12ÚkTLSProtocol11ÚkTLSProtocol1ÚkSSLProtocol3ÚkSSLProtocol2)r\   Úprotocolrj   s   &  r!   ry   ÚWrappedSocket.versionß  sÜ   € Ü×'Ò'Ó)ˆÜ×9Ò9Ø�L‰Lœ&Ÿ,š, xÓ0ó
ˆô 	˜Ô Ø�>‰>œ]×9Ñ9Ô9Ü—,’,ÐIÓJÐJØ�^‰^œ}×;Ñ;Ô;ÙØ�^‰^œ}×;Ñ;Ô;ÙØ�^‰^œ}×:Ñ:Ô:ÙØ�^‰^œ}×:Ñ:Ô:ÙØ�^‰^œ}×:Ñ:Ô:Ùä—,’,Ð8¸8ÕCÓDÐDr    c                ó8   € V ;P                   ^,          un         R# ©ræ   N)rU   rÀ   s   &r!   Ú_reuseÚWrappedSocket._reuseô  s   € Ø×Ò˜qÕ ×r    c                ó~   € V P                   ^8  d   V P                  4        R# V ;P                   ^,          un         R# r	  )rU   r`   rÀ   s   &r!   Ú_dropÚWrappedSocket._drop÷  s*   € Ø×Ñ Ô"Ø�J‰JŽLà×Ò 1Õ$×r    )	rY   rV   r:   rW   rX   rU   rZ   rT   r*   r¾   )F)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r]   Ú
contextlibÚcontextmanagerrb   rk   rr   r‰   rx   r»   r¿   rÅ   rË   r3   r[   r+   rK   rz   rã   r`   rø   ry   r
  r  Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r!   rR   rR   E  s•   ø‡ € ñò"ð$ ×Ññó ðò(!ò4ò!EòF&"òP[òz$òòô)%òV òò%ò"ò,ò%ô&8òtEò*!÷%ð %r    rR   c                 óP   € V ;P                   ^,          un         \        WVRR7      # )ræ   T)r`   )rU   r   )r\   ÚmodeÚbufsizes   &&&r!   Úmakefiler     s"   € Ø×Ò˜qÕ ÕÜ˜4 w°dÔ;Ð;r    c                 ó&   € ^ p\        WV.VO5/ VB # )rÄ   r   )r\   r  Ú	bufferingÚargsÚkwargss   &&&*,r!   r  r    s    € ð ˆ	Ü  ¨YÐH¸ÒHÀÑHÐHr    c                   óü   a € ] tR tRt o RtR t]R 4       t]P                  R 4       t]R 4       t	]	P                  R 4       t	]R 4       t
]
P                  R	 4       t
R
 tR tR tRR ltRR ltR tRR ltRtV tR# )r   i  zŸ
I am a wrapper class for the SecureTransport library, to translate the
interface of the standard library ``SSLContext`` object to calls into
SecureTransport.
c                óœ   € \         V,          w  V n        V n        ^ V n        RV n        RV n        RV n        RV n        RV n        RV n	        R# )rÄ   FN)
Ú_protocol_to_min_maxÚ_min_versionÚ_max_versionÚ_optionsÚ_verifyÚ_trust_bundleÚ_client_certÚ_client_keyÚ_client_key_passphraseÚ_alpn_protocols)r\   r  s   &&r!   r]   ÚSecureTransportContext.__init__  sM   € Ü/CÀHÕ/MÑ,ˆÔ˜4Ô,ØˆŒØˆŒØ!ˆÔØ ˆÔØˆÔØ&*ˆÔ#Ø#ˆÖr    c                ó   € R# )úv
SecureTransport cannot have its hostname checking disabled. For more,
see the comment on getpeercert() in this file.
Tr   rÀ   s   &r!   Úcheck_hostnameÚ%SecureTransportContext.check_hostname!  s   € ñ r    c                ó   € R# )r0  Nr   ©r\   r™   s   &&r!   r1  r2  )  s   € ñ 	r    c                ó   € V P                   # r¾   ©r'  rÀ   s   &r!   ÚoptionsÚSecureTransportContext.options1  s   € ð �}‰}Ðr    c                ó   € Wn         R # r¾   r6  r4  s   &&r!   r7  r8  ;  s	   € ð Žr    c                óf   € V P                   '       d   \        P                  # \        P                  # r¾   )r(  r€   ÚCERT_REQUIREDÚ	CERT_NONErÀ   s   &r!   Úverify_modeÚ"SecureTransportContext.verify_mode@  s   € à$(§L§L LŒs× Ñ ÐC´c·m±mÐCr    c                óP   € V\         P                  8X  d
   R V n        R# RV n        R# )TFN)r€   r;  r(  r4  s   &&r!   r=  r>  D  s   € à$¬×(9Ñ(9Ô9�tˆŽ¸uˆŽr    c                ó   € R # r¾   r   rÀ   s   &r!   Úset_default_verify_pathsÚ/SecureTransportContext.set_default_verify_pathsH  s   € ñ 	r    c                ó"   € V P                  4       # r¾   )rA  rÀ   s   &r!   Úload_default_certsÚ)SecureTransportContext.load_default_certsT  s   € Ø×,Ñ,Ó.Ð.r    c                óZ   € V\         P                  P                  8w  d   \        R 4      hR# )z5SecureTransport doesn't support custom cipher stringsN)r   r   ÚDEFAULT_CIPHERSrì   )r\   ri   s   &&r!   Úset_ciphersÚ"SecureTransportContext.set_ciphersW  s%   € à”d—i‘i×/Ñ/Ô/ÜÐTÓUÐUñ 0r    Nc                ó®   € Ve   \        R4      hVe   \        V4      ;_uu_ 4         R R R 4       T;'       g    TV n        R #   + '       g   i     L#; i)Nz1SecureTransport does not support cert directories)rì   r�   r)  )r\   ÚcafileÚcapathÚcadatas   &&&&r!   Úload_verify_locationsÚ,SecureTransportContext.load_verify_locations\  sG   € àÒÜÐPÓQÐQð ÒÜ�f—•Ø÷ ð $×-Ð- vˆÖ÷ —ús   §AÁA	c                ó*   € Wn         W n        W0n        R # r¾   )r*  r+  Ú_client_cert_passphrase)r\   ÚcertfileÚkeyfileÚpasswords   &&&&r!   Úload_cert_chainÚ&SecureTransportContext.load_cert_chainh  s   € Ø$ÔØ"ÔØ'/Ö$r    c                ó¨   € \        \        R4      '       g   \        R4      hV Uu. uF  p\        P                  ! V4      NK  	  upV n        R# u upi )zx
Sets the ALPN protocols that will later be set on the context.

Raises a NotImplementedError if ALPN is not supported.
rn   z2SecureTransport supports ALPN only in macOS 10.12+N)Úhasattrr   ÚNotImplementedErrorr   Úensure_binaryr-  )r\   rp   Úps   && r!   Úset_alpn_protocolsÚ)SecureTransportContext.set_alpn_protocolsm  sJ   € ô ”xÐ!6×7Ò7Ü%ØDóð ñ ?HÓH¹i¸¤× 1Ò 1°!Ö 4¹iÑHˆÖùÒHs   ¦Ac                ó*  € V'       d   Q hV'       g   Q hV'       g   Q h\        V4      pVP                  VV P                  V P                  V P                  V P
                  V P                  V P                  V P                  V P                  4	       V# r¾   )
rR   r»   r(  r)  r%  r&  r*  r+  r,  r-  )r\   ÚsockÚserver_sideÚdo_handshake_on_connectÚsuppress_ragged_eofsr³   r>   s   &&&&&& r!   Úwrap_socketÚ"SecureTransportContext.wrap_sockety  s‹   € ÷ Ðˆß&Ð&Ð&ß#Ð#Ð#ô ' tÓ,ˆð 	× Ñ ØØ�L‰LØ×ÑØ×ÑØ×ÑØ×ÑØ×ÑØ×'Ñ'Ø× Ñ ô
	
ð Ðr    )
r-  r*  rQ  r+  r,  r&  r%  r'  r)  r(  )NNN)NN)FTTN)r  r  r  r  r  r]   Úpropertyr1  Úsetterr7  r=  rA  rD  rH  rN  rU  r\  rc  r  r  r  s   @r!   r   r     sÅ   ø‡ € ñò$ð ñó ðð ×Ññó ðð ñó ðð ‡^�^ñó ðð ñDó ðDð ×ÑñEó ðEò
ò/òVô

.ô0ò

I÷ò r    r   )éÿÿÿÿ)ÚrN)fr  Ú
__future__r   r  r0   r.   Úos.pathr�   rè   r*   r€   r{   Ú	threadingÚweakrefÚ r   Úpackagesr   Ú	util.ssl_r   Ú_securetransport.bindingsr   r   r   Ú_securetransport.low_levelr	   r
   r   r   r   r   r   ÚImportErrorÚpackages.backports.makefiler   Ú__all__r   r$   r   r   r#   ÚWeakValueDictionaryr'   ÚLockr¥   rÞ   Ú'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384Ú'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256Ú%TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384Ú%TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256Ú-TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256Ú+TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256Ú#TLS_DHE_RSA_WITH_AES_256_GCM_SHA384Ú#TLS_DHE_RSA_WITH_AES_128_GCM_SHA256Ú'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384Ú$TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHAÚ'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256Ú$TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHAÚ%TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384Ú"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHAÚ%TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256Ú"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHAÚ#TLS_DHE_RSA_WITH_AES_256_CBC_SHA256Ú TLS_DHE_RSA_WITH_AES_256_CBC_SHAÚ#TLS_DHE_RSA_WITH_AES_128_CBC_SHA256Ú TLS_DHE_RSA_WITH_AES_128_CBC_SHAÚTLS_AES_256_GCM_SHA384ÚTLS_AES_128_GCM_SHA256ÚTLS_RSA_WITH_AES_256_GCM_SHA384ÚTLS_RSA_WITH_AES_128_GCM_SHA256ÚTLS_AES_128_CCM_8_SHA256ÚTLS_AES_128_CCM_SHA256ÚTLS_RSA_WITH_AES_256_CBC_SHA256ÚTLS_RSA_WITH_AES_128_CBC_SHA256ÚTLS_RSA_WITH_AES_256_CBC_SHAÚTLS_RSA_WITH_AES_128_CBC_SHArg   ÚPROTOCOL_TLSr  r  r$  rX  r  r   r  r   r   r  r   r   r   r   rG   rP   ÚSSLReadFuncr£   ÚSSLWriteFuncr¤   ÚobjectrR   r  r   r   r    r!   Ú<module>r™     s‘  ðñ4õj 'ã Û Û Û Û Û Û 
Û Û Û å Ý Ý +ß NÑ N÷÷ ð@Ý"ð
 !Ð"8Ð
9€ð €à—L‘LÐ Ø—y‘y×+Ñ+Ð ð$ ×.Ò.Ó0Ð Ø —~’~Ó'Ð ð Ð ð ×9Ñ9Ø×9Ñ9Ø×7Ñ7Ø×7Ñ7Ø×?Ñ?Ø×=Ñ=Ø×5Ñ5Ø×5Ñ5Ø×9Ñ9Ø×6Ñ6Ø×9Ñ9Ø×6Ñ6Ø×7Ñ7Ø×4Ñ4Ø×7Ñ7Ø×4Ñ4Ø×5Ñ5Ø×2Ñ2Ø×5Ñ5Ø×2Ñ2Ø×(Ñ(Ø×(Ñ(Ø×1Ñ1Ø×1Ñ1Ø×*Ñ*Ø×(Ñ(Ø×1Ñ1Ø×1Ñ1Ø×.Ñ.Ø×.Ñ.ð=€ðJ 	×Ñ˜×3Ñ3°]×5QÑ5QÐRØ˜-×5Ñ5°}×7SÑ7SÐTðÐ ñ
 ˆ3Ð ×!Ò!à×#Ñ#Ø×#Ñ#ð0Ð˜×+Ñ+Ñ,ñ ˆ3Ð ×!Ò!à×#Ñ#Ø×#Ñ#ð0Ð˜×+Ñ+Ñ,ñ ˆ3Ð ×!Ò!à×#Ñ#Ø×#Ñ#ð0Ð˜×+Ñ+Ñ,ñ ˆ3Ð"×#Ò#à×$Ñ$Ø×$Ñ$ð2Ð˜×-Ñ-Ñ.ñ ˆ3Ð"×#Ò#à×$Ñ$Ø×$Ñ$ð2Ð˜×-Ñ-Ñ.ò	(ò	)ò4,òn0,ðl "×-Ò-¨nÓ=Ð Ø"×/Ò/°Ó@Ð ôv%�Fô v%÷r õ<ôIð "€Ô ôH˜Vö Høð} ô @Ø€Kß?Ð?ð@ús   ÁN ÎN1Î0N1