관리-도구
편집 파일: _openssl.cpython-38.pyc
U &?�f � @ s� d dl Z d dlZd dlZd dlZd dlZddddgZe�d�Ze jej ej d d�dd ��Zee d �dd�Zdej ee edB dd �dd�ZdS )� Nz/etc/ssl/cert.pemz/etc/pki/tls/cert.pemz"/etc/ssl/certs/ca-certificates.crtz/etc/ssl/ca-bundle.pemz^[0-9a-fA-F]{8}\.[0-9]$)�ctx�returnc c sX t �� }|js|jr(t|j�r(| �� n&tD ] }tj� |�r,| j |d� qNq,d V d S )N)�cafile)�ssl�get_default_verify_pathsr �capath�_capath_contains_certs�set_default_verify_paths�_CA_FILE_CANDIDATES�os�path�isfile�load_verify_locations)r �defaultsr � r �M/opt/hc_python/lib/python3.8/site-packages/pip/_vendor/truststore/_openssl.py�_configure_context s r )r r c C s4 t j�| �sdS t �| �D ]}t�|�r dS qdS )zFCheck whether capath exists and contains certs in the expected format.FT)r r �isdir�listdir�_HASHED_CERT_FILENAME_RE�match)r �namer r r r 1 s r )�ssl_context� cert_chain�server_hostnamer c C s d S )Nr )r r r r r r �_verify_peercerts_impl; s r )N)� contextlibr �rer �typingr �compiler �contextmanager� SSLContext�Iteratorr �str�boolr �list�bytesr r r r r �<module> s( � ��