AlkantarClanX12
Current Path : /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/ |
Current File : //usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.pyo |
� ��abc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z e j d e j � Z d � Z d � Z d � Z d d � Z d � Z d � Z d � Z d � Z d � Z d � Z d S( s� Low-level helpers for the SecureTransport bindings. These are Python functions that are not directly related to the high-level APIs but are necessary to get them to work. They include a whole bunch of low-level CoreFoundation messing about and memory management. The concerns in this module are almost entirely about trying to avoid memory leaks and providing appropriate and useful assistance to the higher-level code. i����Ni ( t Securityt CoreFoundationt CFConsts; -----BEGIN CERTIFICATE----- (.*?) -----END CERTIFICATE-----c C s t j t j | t | � � S( sv Given a bytestring, create a CFData object from it. This CFData object must be CFReleased by the caller. ( R t CFDataCreatet kCFAllocatorDefaultt len( t bytestring( ( sZ /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.pyt _cf_data_from_bytes s c C sw t | � } d � | D� } d � | D� } t j | | � } t j | | � } t j t j | | | t j t j � S( sK Given a list of Python tuples, create an associated CFDictionary. c s s | ] } | d Vq d S( i N( ( t .0t t( ( sZ /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.pys <genexpr>, s c s s | ] } | d Vq d S( i N( ( R R ( ( sZ /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.pys <genexpr>- s ( R R t CFTypeReft CFDictionaryCreateR t kCFTypeDictionaryKeyCallBackst kCFTypeDictionaryValueCallBacks( t tuplest dictionary_sizet keyst valuest cf_keyst cf_values( ( sZ /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.pyt _cf_dictionary_from_tuples% s c C s� t j | t j t j � � } t j | t j � } | d k r� t j d � } t j | | d t j � } | s~ t d � � n | j } n | d k r� | j d � } n | S( s� Creates a Unicode string from a CFString object. Used entirely for error reporting. Yes, it annoys me quite a lot that this function is this complex. i s'