/usr/lib/python2.6/site-packages/urllib3/util
NameSizeModeActions
connection.py33410644editdlrm
connection.pyc30400644editdlrm
request.py20890644editdlrm
request.pyc21500644editdlrm
response.py21270644editdlrm
response.pyc21280644editdlrm
retry.py99240644editdlrm
retry.pyc97510644editdlrm
ssl_.py103750644editdlrm
ssl_.pyc89140644editdlrm
timeout.py95440644editdlrm
timeout.pyc95390644editdlrm
url.py58360644editdlrm
url.pyc59100644editdlrm
__init__.py4860644editdlrm
__init__.pyc7840644editdlrm
Edit: /usr/lib/python2.6/site-packages/urllib3/util/ssl_.pyc (8914B)
Ñò ;vVc@sÑddklZlZddklZlZlZddklZl Z dZ e Z dZhed6ed6ed6ZddkZddkZy<ddkZdd klZlZlZdd kl Z Wnej onXy dd klZlZlZWn%ej od\ZZdZnXdZyddkl Z Wn5ej o)ddkZdefd„ƒYZ nXd„Zd„Zd„Zddddd„Z dddddddddd„ Z!dS(iÿÿÿÿ(thexlifyt unhexlify(tmd5tsha1tsha256i(tSSLErrortInsecurePlatformWarningi i(i@N(t wrap_sockett CERT_NONEtPROTOCOL_SSLv23(tHAS_SNI(t OP_NO_SSLv2t OP_NO_SSLv3tOP_NO_COMPRESSIONiiisšECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:!eNULL:!MD5(t SSLContextRcBsneZdeijo d jnp d eijZd„Zd„Zd d d„Zd„Z d d„Z RS( iiicCsO||_t|_ti|_d|_d|_d|_ d|_ d|_ dS(Ni( tprotocoltFalsetcheck_hostnametsslRt verify_modetNonetca_certstoptionstcertfiletkeyfiletciphers(tselftprotocol_version((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pyt__init__?s       cCs||_||_dS(N(RR(RRR((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytload_cert_chainJs cCs*||_|dj otdƒ‚ndS(Ns-CA directories not supported in older Pythons(RRR(Rtcafiletcapath((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytload_verify_locationsNs  cCs'|iptdƒ‚n||_dS(Ns’Your version of Python does not support setting a custom cipher suite. Please upgrade to Python 2.7, 3.2, or later if you need this functionality.(tsupports_set_cipherst TypeErrorR(Rt cipher_suite((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pyt set_ciphersTs  cCsztidtƒh|id6|id6|id6|id6|id6}|iot |d|i |St ||SdS(NsýA true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.RRRt cert_reqst ssl_versionR( twarningstwarnRRRRRRR!RR(Rtsockettserver_hostnametkwargs((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pyR]s      (ii(i(iiN( t__name__t __module__tsyst version_infoR!RRRR R$R(((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pyR;s!  cCsª|iddƒiƒ}t|ƒ}ti|ƒ}|ptdi|ƒƒ‚nt|iƒƒ}||ƒi ƒ}||jo"tdi|t |ƒƒƒ‚ndS(sá 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. t:ts"Fingerprint of invalid length: {0}s6Fingerprints did not match. Expected "{0}", got "{1}".N( treplacetlowertlent HASHFUNC_MAPtgetRtformatRtencodetdigestR(tcertt fingerprintt digest_lengththashfunctfingerprint_bytest cert_digest((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytassert_fingerprintss    cCsa|djotSt|tƒo;tt|dƒ}|djottd|ƒ}n|S|S(sæ 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_NONE`. If given a string it is assumed to be the name of the constant in the :mod:`ssl` module or its abbrevation. (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. tCERT_N(RRt isinstancetstrtgetattrR(t candidatetres((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytresolve_cert_reqsŽs  cCsa|djotSt|tƒo;tt|dƒ}|djottd|ƒ}n|S|S(s like resolve_cert_reqs t PROTOCOL_N(RR RBRCRDR(RERF((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytresolve_ssl_version¥s  cCsÕt|ptiƒ}|djo tin|}|djo(d}|tO}|tO}|tO}n|i|O_t |dt ƒo|i |pt ƒn||_ t |ddƒdj o t|_n|S(sëAll arguments have the same meaning as ``ssl_wrap_socket``. By default, this function does a lot of the same work that ``ssl.create_default_context`` does on Python 3.4+. It: - Disables SSLv2, SSLv3, and compression - Sets a restricted set of server ciphers If you wish to enable SSLv3, you can do:: from urllib3.util import ssl_ context = ssl_.create_urllib3_context() context.options &= ~ssl_.OP_NO_SSLv3 You can do the same to enable compression (substituting ``COMPRESSION`` for ``SSLv3`` in the last line above). :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. :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``. :param ciphers: Which cipher suites to allow the server to select. :returns: Constructed SSLContext object with specified options :rtype: SSLContext iR!RN(RRR Rt CERT_REQUIREDR R R RRDtTrueR$tDEFAULT_CIPHERSRRR(R&R%RRtcontext((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytcreate_urllib3_contextµs#     c Csó|} | djot||d|ƒ} n|p| ovy| i|| ƒWq°tj o} t| ƒ‚q°tj o/} | itijot| ƒ‚n‚q°Xn|o| i||ƒnt o| i |d|ƒS| i |ƒS(s All arguments except for server_hostname, ssl_context, and ca_cert_dir have the same meaning as they do when using :func:`ssl.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. This is not supported on Python 2.6 as the ssl module does not support it. :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(). RR*N( RRNR tIOErrorRtOSErrorterrnotENOENTRR R( tsockRRR%RR*R&Rt ssl_contextt ca_cert_dirRMte((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytssl_wrap_socketôs$    (ii("tbinasciiRRthashlibRRRt exceptionsRRRRRR tcreate_default_contextR5RQR'RRRR t ImportErrorR R R RLR.tobjectR@RGRIRNRW(((s2/tmp/pip-build-cD3xZi/urllib3/urllib3/util/ssl_.pytsJ        8   >