
    ) jNE              
         % S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK	J
r
  SSKJrJr  SSKJrJr  SrSrSrSrS	/r\\\\\\4   rS
 V Vs0 s H  u  pU \" \US5      _M     snn r    S(S jr\R:                  (       a  S SKJr  S SKJ r   SSK!Jr"   " S S\ SS9r#0 r$S\%S'    S SKrS SKJ&r&JrJ'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/JrJ0r0  \*r1\(       a  \" \)5      (       d  SrS H  r2 \" \0\25      \$\" \S\2 35      '   M     SSK!Jr  \Rj                  S\6S4   r7S)S jr8S*S jr9S+S  jr:       S,               S-S! jjr;\Rx                              S.                           S/S" jj5       r=\Rx                              S.                           S0S# jj5       r=            S1                           S0S$ jjr=S2S% jr>S3S& jr? S4         S5S' jjr@gs  snn f ! \3 a     GM6  f = f! \4 a    Sr'Sr(Sr.Sr/S=r1r*Sr+Sr,Sr- GN1f = f)6    )annotationsN)	unhexlify   )ProxySchemeUnsupportedSSLError   )_BRACELESS_IPV6_ADDRZ_RE_IPV4_REFzhttp/1.1))    md5)(   sha1)@   sha256c                (    U R                  S5      nU$ )NzOpenSSL )
startswith)openssl_version
is_openssls     b/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/urllib3/util/ssl_.py(_is_has_never_check_common_name_reliabler      s    
 !++J7J    )
VerifyMode)	TypedDict)SSLTransportc                  4    \ rS rSr% S\S'   S\S'   S\S'   Srg	)
_TYPE_PEER_CERT_RET_DICT.   ztuple[tuple[str, str], ...]subjectAltNamez'tuple[tuple[tuple[str, str], ...], ...]subjectstrserialNumber N)__name__
__module____qualname____firstlineno____annotations____static_attributes__r"   r   r   r   r   .   s    3388r   r   )totalzdict[int, int]_SSL_VERSION_TO_TLS_VERSION)CERT_REQUIREDHAS_NEVER_CHECK_COMMON_NAMEOP_NO_COMPRESSIONOP_NO_TICKETOPENSSL_VERSIONPROTOCOL_TLSPROTOCOL_TLS_CLIENTVERIFY_X509_PARTIAL_CHAINVERIFY_X509_STRICTOP_NO_SSLv2OP_NO_SSLv3
SSLContext
TLSVersion)TLSv1TLSv1_1TLSv1_2	PROTOCOL_i   i @  i   i      i   r   c                   U c  [        S5      eUR                  SS5      R                  5       n[        U5      nU[        ;  a  [        SU 35      e[        R                  U5      nUc  [        SU 35      e[        UR                  5       5      nU" U 5      R                  5       n[        R                  " XT5      (       d   [        SU SUR                  5        S	35      eg)
z
Checks if given fingerprint matches the supplied certificate.

:param cert:
    Certificate as bytes object.
:param fingerprint:
    Fingerprint as string of hexdigits, can be interspersed by colons.
NzNo certificate for the peer.: zFingerprint of invalid length: zAHash function implementation unavailable for fingerprint length: z&Fingerprints did not match. Expected "z", got "")r   replacelowerlenHASHFUNC_MAPgetr   encodedigesthmaccompare_digesthex)certfingerprintdigest_lengthhashfuncfingerprint_bytescert_digests         r   assert_fingerprintrQ   k   s     |566%%c2.446K$ML(8FGG.HOP]_
 	

 "+"4"4"674.'')K{>>4[M+//J[I\\]^
 	
 ?r   c                    U c  [         $ [        U [        5      (       a)  [        [        U S5      nUc  [        [        SU -   5      nU$ U $ )a  
Resolves the argument to a numeric constant, which can be passed to
the wrap_socket function/method from the ssl module.
Defaults to :data:`ssl.CERT_REQUIRED`.
If given a string it is assumed to be the name of the constant in the
:mod:`ssl` module or its abbreviation.
(So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
If it's neither `None` nor a string we assume it is already the numeric
constant which can directly be passed to wrap_socket.
NCERT_)r+   
isinstancer    getattrssl	candidateress     r   resolve_cert_reqsrZ      sL     )S!!c9d+;#w23C
r   c                    U c  [         $ [        U [        5      (       aB  [        [        U S5      nUc  [        [        SU -   5      n[
        R                  " [        U5      $ U $ )z
like resolve_cert_reqs
Nr;   )r0   rT   r    rU   rV   typingcastintrW   s     r   resolve_ssl_versionr_      sX     )S!!c9d+;#{Y67C{{3$$r   c                b   [         c  [        S5      eU S[        [        4;  as  Uc  Ub  [	        S5      e[
        R                  U [        R                  5      n[
        R                  U [        R                  5      n[        R                  " S[        SS9  [        [        5      nUb  XGl        O[        R                  Ul        Ub  XWl        U(       a  UR!                  U5        Uc  ["        R$                  OUnUc&  SnU[&        -  nU[(        -  nU[*        -  nU[,        -  nU=R.                  U-  sl        Uc(  Sn[0        R2                  S:  a  U[4        -  nU[6        -  nU=R8                  U-  sl        [;        US	S5      b  S
Ul        U["        R$                  :X  a  [>        (       d  Xl         S
Ul!        OSUl!        Xl         SUl"        S[F        RH                  ;   a=  [F        RJ                  RM                  [F        RH                  R                  S5      5      nOSnU(       a  Xl'        U$ )a  Creates and configures an :class:`ssl.SSLContext` instance for use with urllib3.

:param ssl_version:
    The desired protocol version to use. This will default to
    PROTOCOL_SSLv23 which will negotiate the highest protocol that both
    the server and your installation of OpenSSL support.

    This parameter is deprecated instead use 'ssl_minimum_version'.
:param ssl_minimum_version:
    The minimum version of TLS to be used. Use the 'ssl.TLSVersion' enum for specifying the value.
:param ssl_maximum_version:
    The maximum version of TLS to be used. Use the 'ssl.TLSVersion' enum for specifying the value.
    Not recommended to set to anything other than 'ssl.TLSVersion.MAXIMUM_SUPPORTED' which is the
    default value.
:param cert_reqs:
    Whether to require the certificate verification. This defaults to
    ``ssl.CERT_REQUIRED``.
:param options:
    Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
    ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``, and ``ssl.OP_NO_TICKET``.
:param ciphers:
    Which cipher suites to allow the server to select. Defaults to either system configured
    ciphers if OpenSSL 1.1.1+, otherwise uses a secure default set of ciphers.
:param verify_flags:
    The flags for certificate verification operations. These default to
    ``ssl.VERIFY_X509_PARTIAL_CHAIN`` and ``ssl.VERIFY_X509_STRICT`` for Python 3.13+.
:returns:
    Constructed SSLContext object with specified options
:rtype: SSLContext
Nz7Can't create an SSLContext object without an ssl modulezZCan't specify both 'ssl_version' and either 'ssl_minimum_version' or 'ssl_maximum_version'zi'ssl_version' option is deprecated and will be removed in urllib3 v3.0. Instead use 'ssl_minimum_version'r   )category
stacklevelr   )      post_handshake_authTFSSLKEYLOGFILE)(r6   	TypeErrorr0   r1   
ValueErrorr*   rE   r7   MINIMUM_SUPPORTEDMAXIMUM_SUPPORTEDwarningswarnFutureWarningminimum_versionr:   maximum_versionset_ciphersrV   r+   r4   r5   r-   r.   optionssysversion_infor2   r3   verify_flagsrU   re   IS_PYOPENSSLverify_modecheck_hostnamehostname_checks_common_nameosenvironpath
expandvarskeylog_filename)	ssl_version	cert_reqsrq   ciphersssl_minimum_versionssl_maximum_versionrt   contextsslkeylogfiles	            r   create_urllib3_contextr      s   N QRR 4/BCC *.A.MA  #>"A"AZ99# #>"A"AZ99# MMM&	 ,-G&"5","4"4&"5 G$ &/%6!!II;; 	$$
 	<OOwO w&55L..LL( w-t4@&*# C%%%ll'!%!&'*/G'"**$**2::>>/+JK"/Nr   c                    g Nr"   sockkeyfilecertfiler   ca_certsserver_hostnamer~   r   ssl_contextca_cert_dirkey_passwordca_cert_data
tls_in_tlss                r   ssl_wrap_socketr   G  s     r   c                    g r   r"   r   s                r   r   r   Y  s     (+r   c                   UnUc
  [        XcUS9nU(       d  U	(       d  U(       a   UR                  XIU5        O$Uc!  [	        US5      (       a  UR                  5         U(       a  U
c  [        U5      (       a  [        S5      eU(       a'  U
c  UR                  X!5        OUR                  X!U
5        UR                  [        5        [        XX5      nU$ ! [         a  n[        U5      UeSnAff = f)aX  
All arguments except for server_hostname, ssl_context, tls_in_tls, ca_cert_data and
ca_cert_dir have the same meaning as they do when using
:func:`ssl.create_default_context`, :meth:`ssl.SSLContext.load_cert_chain`,
:meth:`ssl.SSLContext.set_ciphers` and :meth:`ssl.SSLContext.wrap_socket`.

:param server_hostname:
    When SNI is supported, the expected hostname of the certificate
:param ssl_context:
    A pre-made :class:`SSLContext` object. If none is provided, one will
    be created using :func:`create_urllib3_context`.
:param ciphers:
    A string of ciphers we wish the client to support.
:param ca_cert_dir:
    A directory containing CA certificates in multiple separate files, as
    supported by OpenSSL's -CApath flag or the capath argument to
    SSLContext.load_verify_locations().
:param key_password:
    Optional password if the keyfile is encrypted.
:param ca_cert_data:
    Optional string containing CA certificates in PEM format suitable for
    passing as the cadata parameter to SSLContext.load_verify_locations()
:param tls_in_tls:
    Use SSLTransport to wrap the existing socket.
N)r   load_default_certsz5Client private key is encrypted, password is required)r   load_verify_locationsOSErrorr   hasattrr   _is_key_file_encryptedload_cert_chainset_alpn_protocolsALPN_PROTOCOLS_ssl_wrap_socket_impl)r   r   r   r   r   r   r~   r   r   r   r   r   r   r   essl_socks                   r   r   r   k  s    P G )Q;,	%))(N 
	2F!G!G""$
 <',B7,K,KNOO##H6##H|D~.$TJPHO-  	%1+1$	%s   C 
C.C))C.c                    [        U [        5      (       a  U R                  S5      n [        [        R
                  " U 5      =(       d    [        R
                  " U 5      5      $ )zDetects whether the hostname given is an IPv4 or IPv6 address.
Also detects IPv6 addresses with Zone IDs.

:param str hostname: Hostname to examine.
:return: True if the hostname is an IP address, False otherwise.
ascii)rT   bytesdecodeboolr
   matchr	   )hostnames    r   is_ipaddressr     sD     (E""??7+x(T,D,J,J8,TUUr   c                    [        U 5       nU H  nSU;   d  M    SSS5        g   SSS5        g! , (       d  f       g= f)z*Detects if a key file is encrypted or not.	ENCRYPTEDNTF)open)key_fileflines      r   r   r     s<    	h1Dd"	 
 
  
 s   
///
=c                    U(       a8  [         (       d  [        S5      e[         R                  " U5        [        XU5      $ UR                  XS9$ )Nz0TLS in TLS requires support for the 'ssl' module)r   )r   r   $_validate_ssl_context_for_tls_in_tlswrap_socket)r   r   r   r   s       r   r   r     sM     |(B  	99+FD??""4"IIr   )r   r    returnr   )rK   zbytes | NonerL   r    r   None)rX   None | int | strr   r   )rX   r   r   r^   )NNNNNNN)r~   
int | Noner   r   rq   r   r   
str | Noner   r   r   r   rt   r   r   ssl.SSLContext)............)r   socket.socketr   r   r   r   r   r   r   r   r   r   r~   r   r   r   r   ssl.SSLContext | Noner   r   r   r   r   None | str | bytesr   ztyping.Literal[False]r   zssl.SSLSocket)r   r   r   r   r   r   r   r   r   r   r   r   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r    ssl.SSLSocket | SSLTransportType)NNNNNNNNNNNF)r   zstr | bytesr   r   )r   r    r   r   r   )
r   r   r   r   r   r   r   r   r   r   )A
__future__r   hashlibrH   ry   socketrr   r\   rk   binasciir   
exceptionsr   r   urlr	   r
   r6   r   r,   ru   r   tupler^   r    _TYPE_VERSION_INFOrU   rD   r   TYPE_CHECKINGrV   r   r   ssltransportSSLTransportTyper   r*   r'   r+   r-   r.   r/   r0   r1   r2   r3   r4   r5   r7   PROTOCOL_SSLv23attrAttributeErrorImportErrorUnionr   _TYPE_PEER_CERT_RETrQ   rZ   r_   r   overloadr   r   r   r   )length	algorithms   00r   <module>r      s   "   	  
    9 3
# 3S#s23 
 IH GGY--H	 
 >9E  /1 ^ 0.     #O #+S, , ',# 0	LSDM'y5G(HI 0 + ll#=ud#JK 
D." # &*&*#PPP P 	P
 $P $P P Pf  "%!),!"'*(+
  	
      '   % &  "  "%!),!"'*+
++ + 	+
 +  + + + '+ + + %+ + &+ +&  "&")-"#'+G
GG G 	G
 G  G G G 'G G G %G G &GT
V #'	J
JJ J  	J
 &JkB  		  LKK%&&Ol 's<   H-?H# -H
H# H H# H  H# #H?>H?