관리-도구
편집 파일: ssl_support.cpython-38.opt-1.pyc
U �Qab-! � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZmZmZm Z d dl mZmZ zd dl Z W n ek rt dZ Y nX dddddgZd �� �� ZzejjZejZW n ek r� e ZZY nX e dk o�eeefkZzd d l mZmZ W nR ek �r: zd dlmZ d dlmZ W n ek �r4 dZdZY nX Y nX e�sRG d d� de�Ze�sjddd�Zdd� ZG dd� de�ZG dd� de�Zd dd�Z dd� Z!e!dd� �Z"dd� Z#dd� Z$dS )!� N)�urllib�http_client�map�filter)�ResolutionError�ExtractionError�VerifyingHTTPSHandler�find_ca_bundle�is_available� cert_paths� opener_fora /etc/pki/tls/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt /usr/share/ssl/certs/ca-bundle.crt /usr/local/share/certs/ca-root.crt /etc/ssl/cert.pem /System/Library/OpenSSL/certs/cert.pem /usr/local/share/certs/ca-root-nss.crt /etc/ssl/ca-bundle.pem )�CertificateError�match_hostname)r )r c @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r �:/usr/lib/python3.8/site-packages/setuptools/ssl_support.pyr 5 s r � c C s� g }| sdS | � d�}|d }|dd� }|�d�}||krLtdt| � ��|s`| �� |�� kS |dkrt|�d� n>|�d �s�|�d �r�|�t�|�� n|�t�|�� d d�� |D ]}|�t�|�� q�t� dd �|� d tj�} | � |�S )zqMatching according to RFC 6125, section 6.4.3 https://tools.ietf.org/html/rfc6125#section-6.4.3 F�.r r N�*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)�split�countr �repr�lower�append� startswith�re�escape�replace�compile�join� IGNORECASE�match) Zdn�hostnameZ max_wildcardsZpats�partsZleftmostZ remainderZ wildcardsZfragZpatr r r �_dnsname_match; s, �r&