ó
“àfac           @   sD   d  d l  m Z m Z m Z d d d d „ Z d d d d „ Z d S(   i   (   t   create_urllib3_contextt   resolve_cert_reqst   resolve_ssl_versionc         C   sF   |  d k r t S| d k r  t S|  j d k rB | rB | j rB t St S(   s?  
    Returns True if the connection requires an HTTP CONNECT through the proxy.

    :param URL proxy_url:
        URL of the proxy.
    :param ProxyConfig proxy_config:
        Proxy configuration from poolmanager.py
    :param str destination_scheme:
        The scheme of the destination. (i.e https, http, etc)
    t   httpt   httpsN(   t   Nonet   Falset   schemet   use_forwarding_for_httpst   True(   t	   proxy_urlt   proxy_configt   destination_scheme(    (    s=   /tmp/pip-install-YjPQSb/pip/pip/_vendor/urllib3/util/proxy.pyt   connection_requires_http_tunnel   s    	c         C   sV   t  d t |  ƒ d t | ƒ ƒ } | rR | rR | rR t | d ƒ rR | j ƒ  n  | S(   s\   
    Generates a default proxy ssl context if one hasn't been provided by the
    user.
    t   ssl_versiont	   cert_reqst   load_default_certs(   R    R   R   t   hasattrR   (   R   R   t   ca_certst   ca_cert_dirt   ca_cert_datat   ssl_context(    (    s=   /tmp/pip-install-YjPQSb/pip/pip/_vendor/urllib3/util/proxy.pyt   create_proxy_ssl_context%   s    N(   t   ssl_R    R   R   R   R   R   (    (    (    s=   /tmp/pip-install-YjPQSb/pip/pip/_vendor/urllib3/util/proxy.pyt   <module>   s   !