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_Je/e js_KeAe?ge jt_Je/e jt_Ky"eAe2ge ju_Je/e ju_KWnevk rķnXe/ege jQ_Je1e jQ_KeVe _VeWe _WeAe _Ae?e _?e@e _@e;e _;e>e _>eBe _BeDe _De9e _9e/e _/e1jwe dƒe _xe1jwe dƒe _ye-ge!jz_Je-e!jz_Ke-ge!j{_Jde!j{_Ke-ge!j}_Je,e!j}_Ke.e e$ge!j~_Je1e!j~_Ke1e$ge!j_Je e!j_Ke1e e#e$ge!j€_Jee!j€_Ke.e e#ge!j_Je0e!j_Ke0ge!j‚_Je#e!j‚_Ke0ge!jƒ_Jee!jƒ_Ke.ee-ƒee-ƒe#e6e7ge!j„_Je4e!j„_Ke4e-ge!j…_Je-e!j…_Ke.ee-ƒe#e5ge!j†_Je2e!j†_Ke.e#e5ge!j‡_Je3e!j‡_Ke3ege!jˆ_Jde!jˆ_Ke2ge!j‰_Je#e!j‰_Ke2e#ge!jŠ_Jee!jŠ_Ke.jwe!dƒe!_‹ejwe!dƒe!_Œejwe!dƒe!_ejwe!dƒe!_Že-e!_-e2e!_2e1e!_1e4e!_4Wnevk r2 edƒ‚nXdefd„ƒYZdefd„ƒYZ‘dS(sy 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 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. i(tabsolute_importN( tCDLLt CFUNCTYPEtPOINTERtc_booltc_bytetc_char_ptc_int32tc_longtc_size_ttc_uint32tc_ulongtc_void_p(t find_library(t raise_fromtDarwinsOnly macOS is supportedt.i is1Only OS X 10.8 and newer are supported, not %s.%sicC@ssyDtdkr|}n t|ƒ}|s3t‚nt|dtƒSWn(tk rnttd|ƒdƒnXdS(s:Loads a CDLL by name, falling back to known path on 10.16+i it use_errnosThe library %s failed to loadN(i i(t version_infoR tOSErrorRtTrueRt ImportErrortNone(tnametmacos10_16_pathtpath((sT/opt/awscli/lib/python2.7/site-packages/urllib3/contrib/_securetransport/bindings.pyt load_cdllAs     tSecuritys6/System/Library/Frameworks/Security.framework/SecuritytCoreFoundationsB/System/Library/Frameworks/CoreFoundation.framework/CoreFoundationtkSecImportExportPassphrasetkSecImportItemIdentitytkCFAllocatorDefaulttkCFTypeArrayCallBackstkCFTypeDictionaryKeyCallBackstkCFTypeDictionaryValueCallBackssError initializing ctypestCFConstcB@seZdZedƒZRS(s_ A class object that acts as essentially a namespace for CoreFoundation constants. i(t__name__t __module__t__doc__tCFStringEncodingtkCFStringEncodingUTF8(((sT/opt/awscli/lib/python2.7/site-packages/urllib3/contrib/_securetransport/bindings.pyR#§st SecurityConstcB@s²eZdZdZdZdZdZdZdZdZ dZ dZ dZ dZ dZdZd ZdZd Zd ZdZd Zd ZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(d Z)d!Z*d"Z+d#Z,d$Z-d%Z.d&Z/d'Z0d(Z1d)Z2d*Z3d+Z4d,Z5d-Z6d.Z7d/Z8d0Z9d1Z:d2Z;d3Z<d4Z=d5Z>d6Z?d7Z@d8ZAd9ZBd:ZCd;ZDd<ZEd=ZFd>ZGd?ZHRS(@sU A class object that acts as essentially a namespace for Security constants. iiiiiii iēiiiiøŁ’’iµŁ’’i³Ł’’iØŁ’’i²Ł’’i±Ł’’iÆŁ’’i®Ł’’iŖŁ’’i©Ł’’i¬Ł’’i«Ł’’iŁ’’i Ł’’i‘Ł’’i†Ł’’iŁ’’i‰Ł’’i ÷ž’iQ’’i,’’iR’’i,Ąi0Ąi+Ąi/Ąi©ĢiØĢiŸiži$Ąi(Ąi ĄiĄiki9i#Ąi'Ąi ĄiĄigi3iiœi=i<i5i/iiii(IR$R%R&t"kSSLSessionOptionBreakOnServerAutht kSSLProtocol2t kSSLProtocol3t kTLSProtocol1tkTLSProtocol11tkTLSProtocol12tkTLSProtocol13tkTLSProtocolMaxSupportedtkSSLClientSidetkSSLStreamTypetkSecFormatPEMSequencetkSecTrustResultInvalidtkSecTrustResultProceedtkSecTrustResultDenytkSecTrustResultUnspecifiedt&kSecTrustResultRecoverableTrustFailuret kSecTrustResultFatalTrustFailuretkSecTrustResultOtherErrorterrSSLProtocolterrSSLWouldBlockterrSSLClosedGracefulterrSSLClosedNoNotifyterrSSLClosedAbortterrSSLXCertChainInvalidt errSSLCryptoterrSSLInternalterrSSLCertExpiredterrSSLCertNotYetValidterrSSLUnknownRootCertterrSSLNoRootCertterrSSLHostNameMismatchterrSSLPeerHandshakeFailterrSSLPeerUserCancelledterrSSLWeakPeerEphemeralDHKeyterrSSLServerAuthCompletedterrSSLRecordOverflowterrSecVerifyFailedterrSecNoTrustSettingsterrSecItemNotFoundterrSecInvalidTrustSettingst'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384t%TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384t'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256t%TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256t-TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256t+TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256t#TLS_DHE_RSA_WITH_AES_256_GCM_SHA384t#TLS_DHE_RSA_WITH_AES_128_GCM_SHA256t'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384t%TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384t$TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHAt"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHAt#TLS_DHE_RSA_WITH_AES_256_CBC_SHA256t TLS_DHE_RSA_WITH_AES_256_CBC_SHAt'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256t%TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256t$TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHAt"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHAt#TLS_DHE_RSA_WITH_AES_128_CBC_SHA256t TLS_DHE_RSA_WITH_AES_128_CBC_SHAtTLS_RSA_WITH_AES_256_GCM_SHA384tTLS_RSA_WITH_AES_128_GCM_SHA256tTLS_RSA_WITH_AES_256_CBC_SHA256tTLS_RSA_WITH_AES_128_CBC_SHA256tTLS_RSA_WITH_AES_256_CBC_SHAtTLS_RSA_WITH_AES_128_CBC_SHAtTLS_AES_128_GCM_SHA256tTLS_AES_256_GCM_SHA384tTLS_AES_128_CCM_8_SHA256tTLS_AES_128_CCM_SHA256(((sT/opt/awscli/lib/python2.7/site-packages/urllib3/contrib/_securetransport/bindings.pyR)°sŽ(i i(’R&t __future__RtplatformtctypesRRRRRRRRR R R R t ctypes.utilR turllib3.packages.sixRtsystemRtmac_vertversionttupletmaptinttsplitRRRRRtBooleantCFIndexR'tCFDatatCFStringtCFArraytCFMutableArrayt CFDictionarytCFErrortCFTypetCFTypeIDt CFTypeReftCFAllocatorReftOSStatust CFDataReft CFStringReft CFArrayReftCFMutableArrayReftCFDictionaryReftCFArrayCallBackstCFDictionaryKeyCallBackstCFDictionaryValueCallBackstSecCertificateReftSecExternalFormattSecExternalItemTypetSecIdentityReftSecItemImportExportFlagst SecItemImportExportKeyParameterstSecKeychainReft SSLProtocoltSSLCipherSuitet SSLContextReft SecTrustReftSSLConnectionReftSecTrustResultTypetSecTrustOptionFlagstSSLProtocolSidetSSLConnectionTypetSSLSessionOptiont SecItemImporttargtypestrestypetSecCertificateGetTypeIDtSecIdentityGetTypeIDtSecKeyGetTypeIDtSecCertificateCreateWithDatatSecCertificateCopyDatatSecCopyErrorMessageStringt SecIdentityCreateWithCertificatetSecKeychainCreatetSecKeychainDeletetSecPKCS12Importt SSLReadFunct SSLWriteFunct SSLSetIOFuncst SSLSetPeerIDtSSLSetCertificatetSSLSetCertificateAuthoritiestSSLSetConnectiontSSLSetPeerDomainNamet SSLHandshaketSSLReadtSSLWritetSSLClosetSSLGetNumberSupportedCipherstSSLGetSupportedCipherstSSLSetEnabledCipherstSSLGetNumberEnabledCipherstargtypetSSLGetEnabledCipherstSSLGetNegotiatedCiphertSSLGetNegotiatedProtocolVersiontSSLCopyPeerTrusttSecTrustSetAnchorCertificatest!SecTrustSetAnchorCertificatesOnlyt argstypestSecTrustEvaluatetSecTrustGetCertificateCounttSecTrustGetCertificateAtIndextSSLCreateContexttSSLSetSessionOptiontSSLSetProtocolVersionMintSSLSetProtocolVersionMaxtSSLSetALPNProtocolstAttributeErrortin_dllRRtCFRetaint CFReleaseRt CFGetTypeIDtCFStringCreateWithCStringtCFStringGetCStringPtrtCFStringGetCStringt CFDataCreatetCFDataGetLengthtCFDataGetBytePtrtCFDictionaryCreatetCFDictionaryGetValuet CFArrayCreatetCFArrayCreateMutabletCFArrayAppendValuetCFArrayGetCounttCFArrayGetValueAtIndexRR R!R"tobjectR#R)(((sT/opt/awscli/lib/python2.7/site-packages/urllib3/contrib/_securetransport/bindings.pytsš R