zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
U
 ý°dt8ã    @s°dZddlmZddlZddlmZmZmZmZm    Z    m
Z
m Z m Z m Z mZmZmZddlmZe ¡dkrpedƒ‚e ¡dZeeee d¡ƒƒZed    kr´ed
ed›ded ›ƒ‚d d d dœdd„ZeddƒZeddƒZeZ e Z!eZ"eZ#eZ$eZ%eZ&eZ'eZ(eZ)eZ*ee)ƒZ+eZ,e Z-ee#ƒZ.ee$ƒZ/ee%ƒZ0ee&ƒZ1ee'ƒZ2eZ3eZ4eZ5eeƒZ6eZ7eZ8eeƒZ9eZ:eZ;eeƒZ<eZ=eZ>eeƒZ?eeƒZ@eZAeZBeZCeZDeZEeZFzØe.e/ee7ƒee8ƒe:ee;ƒe<ee0ƒgejG_He-ejG_IgejJ_He*ejJ_IgejK_He*ejK_IgejL_He*ejL_Ie,e.gejM_He6ejM_Ie6gejN_He.ejN_Ie-egejO_He/ejO_Ie+e6ee9ƒgejP_He-ejP_Ie
eee eee<ƒgejQ_He-ejQ_Ie<gejR_He-ejR_Ie.e2ee0ƒgejS_He-ejS_Iee-eAeee ƒƒZTee-eAee    ƒee ƒƒZUe?eTeUgejV_He-ejV_Ie?e
e gejW_He-ejW_Ie?e0gejX_He-ejX_Ie?e+e gejY_He-ejY_Ie?eAgejZ_He-ejZ_Ie?e
e gej[_He-ej[_Ie?gej\_He-ej\_Ie?e
e ee ƒgej]_He-ej]_Ie?e
e ee ƒgej^_He-ej^_Ie?gej__He-ej__Ie?ee ƒgej`_He-ej`_Ie?ee>ƒee ƒgeja_He-eja_Ie?ee>ƒe gejb_He-ejb_Ie?ee ƒgejc_de-ejc_Ie?ee>ƒee ƒgeje_He-eje_Ie?ee>ƒgejf_He-ejf_Ie?ee=ƒgejg_He-ejg_Ie?ee@ƒgejh_He-ejh_Ie@e0geji_He-eji_Ie@e gejj_ke-ejj_Ie@eeBƒgejl_He-ejl_Ie@gejm_He!ejm_Ie@e!gejn_He6ejn_Ie,eDeEgejo_He?ejo_Ie?eFe gejp_He-ejp_Ie?e=gejq_He-ejq_Ie?e=gejr_He-ejr_Ize?e0gejs_He-ejs_IWnetk
r`YnXe-egejO_He/ejO_IeTe_TeUe_Ue?e_?e=e_=e>e_>e9e_9e<e_<e@e_@eBe_Be7e_7e-e_-e/ ued¡e_ve/ ued¡e_we+gejx_He+ejx_Ie+gejy_Hdejy_Ie+gejz_He*ejz_Ie,e
e"gej{_He/ej{_Ie/e"gej|_He
ej|_Ie/e
e!e"gej}_Heej}_Ie,e
e!gej~_He.ej~_Ie.gej_He!ej_Ie.gej€_Heej€_Ie,ee+ƒee+ƒe!e4e5gej_He2ej_Ie2e+gej‚_He+ej‚_Ie,ee+ƒe!e3gejƒ_He0ejƒ_Ie,e!e3gej„_He1ej„_Ie1egej…_Hdej…_Ie0gej†_He!ej†_Ie0e!gej‡_Heej‡_Ie, ued¡e_ˆe ued¡e_‰e ued¡e_Še ued¡e_‹e+e_+e0e_0e/e_/e2e_2Wn etk
rœedƒd‚YnXGdd„dƒZŒdS)ay
This module uses ctypes to bind a whole bunch of functions and constants from
SecureTransport. The goal here is to provide the low-level API to
SecureTransport. These are essentially the C-level functions and constants, and
they're pretty gross to work with.
 
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:
 
    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.
é)Ú annotationsN) ÚCDLLÚ    CFUNCTYPEÚPOINTERÚc_boolÚc_byteÚc_char_pÚc_int32Úc_longÚc_size_tÚc_uint32Úc_ulongÚc_void_p)Ú find_libraryÚDarwinzOnly macOS is supportedÚ.)é
éz,Only OS X 10.8 and newer are supported, not éÚstrr)ÚnameÚmacos10_16_pathÚreturncCsXz,tdkr|}nt|ƒ}|s t‚t|ddWStk
rRtd|›dƒd‚YnXdS)z:Loads a CDLL by name, falling back to known path on 10.16+)réT)Ú    use_errnoz The library z failed to loadN)Ú version_inforÚOSErrorrÚ ImportError)rrÚpath©rú`d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\urllib3/contrib/_securetransport/bindings.pyÚ    load_cdllAsr!ÚSecurityz6/System/Library/Frameworks/Security.framework/SecurityÚCoreFoundationzB/System/Library/Frameworks/CoreFoundation.framework/CoreFoundationÚkSecImportExportPassphraseÚkSecImportItemIdentityÚkCFAllocatorDefaultÚkCFTypeArrayCallBacksÚkCFTypeDictionaryKeyCallBacksÚkCFTypeDictionaryValueCallBackszError initializing ctypesc@seZdZdZedƒZdS)ÚCFConstz_
    A class object that acts as essentially a namespace for CoreFoundation
    constants.
    iN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚCFStringEncodingZkCFStringEncodingUTF8rrrr r*¨sr*)r.Ú
__future__rÚplatformÚctypesrrrrrrr    r
r r r rÚ ctypes.utilrÚsystemrÚmac_verÚversionÚtupleÚmapÚintÚsplitrrr!r"r#ÚBooleanZCFIndexr/ZCFDataZCFStringZCFArrayZCFMutableArrayZ CFDictionaryZCFErrorZCFTypeZCFTypeIDZ    CFTypeRefZCFAllocatorRefZOSStatusZ    CFDataRefZ CFStringRefZ
CFArrayRefZCFMutableArrayRefZCFDictionaryRefZCFArrayCallBacksZCFDictionaryKeyCallBacksZCFDictionaryValueCallBacksZSecCertificateRefZSecExternalFormatZSecExternalItemTypeZSecIdentityRefZSecItemImportExportFlagsZ SecItemImportExportKeyParametersZSecKeychainRefZ SSLProtocolZSSLCipherSuiteZ SSLContextRefZ SecTrustRefZSSLConnectionRefZSecTrustResultTypeZSecTrustOptionFlagsZSSLProtocolSideZSSLConnectionTypeZSSLSessionOptionZ SecItemImportÚargtypesÚrestypeZSecCertificateGetTypeIDZSecIdentityGetTypeIDZSecKeyGetTypeIDZSecCertificateCreateWithDataZSecCertificateCopyDataZSecCopyErrorMessageStringZ SecIdentityCreateWithCertificateZSecKeychainCreateZSecKeychainDeleteZSecPKCS12ImportZ SSLReadFuncZ SSLWriteFuncZ SSLSetIOFuncsZ SSLSetPeerIDZSSLSetCertificateZSSLSetCertificateAuthoritiesZSSLSetConnectionZSSLSetPeerDomainNameZ SSLHandshakeZSSLReadZSSLWriteZSSLCloseZSSLGetNumberSupportedCiphersZSSLGetSupportedCiphersZSSLSetEnabledCiphersZSSLGetNumberEnabledCiphersZargtypeZSSLGetEnabledCiphersZSSLGetNegotiatedCipherZSSLGetNegotiatedProtocolVersionZSSLCopyPeerTrustZSecTrustSetAnchorCertificatesZ!SecTrustSetAnchorCertificatesOnlyZ    argstypesZSecTrustEvaluateZSecTrustGetCertificateCountZSecTrustGetCertificateAtIndexZSSLCreateContextZSSLSetSessionOptionZSSLSetProtocolVersionMinZSSLSetProtocolVersionMaxZSSLSetALPNProtocolsÚAttributeErrorÚin_dllr$r%ZCFRetainZ    CFReleaseZ CFGetTypeIDZCFStringCreateWithCStringZCFStringGetCStringPtrZCFStringGetCStringZ CFDataCreateZCFDataGetLengthZCFDataGetBytePtrZCFDictionaryCreateZCFDictionaryGetValueZ CFArrayCreateZCFArrayCreateMutableZCFArrayAppendValueZCFArrayGetCountZCFArrayGetValueAtIndexr&r'r(r)r*rrrr Ú<module>s.  8   ÿÿþø
 
 ýú
ýÿ  
 
ýýýþ  
 ý     ÿÿ
 
 
ý ü
 
ú üý 
 ÿÿÿÿ