관리-도구
편집 파일: _macos.cpython-38.pyc
U &?�f�D � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZmZmZmZm Z m Z mZmZm Z d dlmZ ddlmZ e�� d Zeeee�d���Zedk r�eded � ded � ���eeed �d d�Zedd �Zedd�ZeZe ZeZ e Z!e Z"e Z#e Z$e Z%e Z&eZ'ee&�Z(e Z)e Z*ee%�Z+ee!�Z,ee"�Z-ee#�Z.ee$�Z/e Z0eZ1ee �Z2ee �Z3ee �Z4eZ5eZ6�z<e)e,gej7_8e2ej7_9e2gej:_8e,ej:_9e*e gej;_8e-ej;_9e4e.gej<_8e*ej<_9e4egej=_8e*ej=_9e1gej>_8e3ej>_9ee-gej?_8e3ej?_9e(e(ee4�gej@_8e*ej@_9e4ee5�gejA_8e*ejA_9e4e_4e5e_5e*e_*dZBdZCe(gejD_8dejD_9e(gejE_8e'ejE_9e)ee gejF_8e-ejF_9e-e gejG_8eejG_9e-eee gejH_8eejH_9e)eegejI_8e,ejI_9e,gejJ_8eejJ_9e,gejK_8e ejK_9e)ee(�ee0gejL_8e.ejL_9e)ee0gejM_8e/ejM_9e/e gejN_8dejN_9e.gejO_8eejO_9e.egejP_8e ejP_9e+gejQ_8eejQ_9e+gejR_8e-ejR_9e)�Sed�e_Te �Sed�e_Ue(e_(e.e_.e-e_-e+e_+W n eVk �r� ed�d�Y nX e*ejWejWejWd�dd�ZXeXej@_YeXej<_YeXej=_YeXejA_YG dd� d�ZZe[e,d�dd�Z\e[e"d�dd�Z]e-edB d�d d!�Z^e_e[ e/d"�d#d$�Z`e jaejbejcd d%�d&d'��Zdd+ejbe_e[ edB dd(�d)d*�ZedS ),� N) �CDLL�POINTER�c_bool�c_char_p�c_int32�c_long�c_uint32�c_ulong�c_void_p)�find_library� )�_set_ssl_context_verify_mode�.)� � z,Only OS X 10.8 and newer are supported, not )�name�macos10_16_path�returnc C sX z,t dkr|}nt| �}|s t�t|dd�W S tk rR td| � d��d�Y nX dS )z:Loads a CDLL by name, falling back to known path on 10.16+)r � T)Z use_errnozThe library z failed to loadN)�_mac_version_infor �OSErrorr �ImportError)r r �path� r �K/opt/hc_python/lib/python3.8/site-packages/pip/_vendor/truststore/_macos.py� _load_cdll s r �Securityz6/System/Library/Frameworks/Security.framework/Security�CoreFoundationzB/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation� r �kCFAllocatorDefault�kCFTypeArrayCallBackszError initializing ctypes)�result�_�argsr c C s� t | �dkr|S d}zht�| d�}t�|t�tj��}t� |t j�}|dkrzt�d�}t� ||dt j�} | sttd��|j}W 5 |dk r�t�|� X |dks�|dkr�d| � �}t�|��dS )z< Raises an error if the OSStatus value is non-zero. r N� �'Error copying C string from CFStringRef� z8SecureTransport operation returned a non-zero OSStatus: )�intr � CFReleaser �SecCopyErrorMessageString�ctypes�castr r �CFStringGetCStringPtr�CFConst�kCFStringEncodingUTF8�create_string_buffer�CFStringGetCStringr �value�ssl�SSLError)r! r"