관리-도구
편집 파일: ssl_.cpython-38.opt-1.pyc
U ��.eS7 � @ s( d dl mZ d dlZd dlZd dlZd dlZd dlmZmZ d dl m Z mZmZ ddl mZmZ ddlmZmZmZ dd lmZ dZd Zd Zd Ze eed�Zdd � Zeede�Zz(d dlZd dlmZm Z d dlmZ W n e!k r� Y nX zd dlm"Z" e"Z#W nJ e!k �rL zd dlm#Z" e"Z#W n e!k �rF d Z#Z"Y nX Y nX zd dlm$Z$m%Z%m&Z& W n" e!k �r� d\Z$Z%dZ&Y nX d�'dddddddddd d!d"d#d$g�Z(zd d%lmZ W n& e!k �r� G d&d'� d'e)�ZY nX d(d)� Z*d*d+� Z+d,d-� Z,d6d.d/�Z-d7d0d1�Z.d2d3� Z/d4d5� Z0dS )8� )�absolute_importN)�hexlify� unhexlify)�md5�sha1�sha256� )�IPV4_RE�BRACELESS_IPV6_ADDRZ_RE� )�SSLError�InsecurePlatformWarning�SNIMissingWarning)�sixF)� �( �@ c C sD t t| �t|� �}tt| �t|��D ]\}}|||A O }q&|dkS )z� Compare two digests of equal length in constant time. The digests must be of type str/bytes. Returns True if the digests match, and False otherwise. r )�abs�len�zip� bytearray)�a�b�result�l�r� r �A/usr/lib/python3.8/site-packages/pip/_vendor/urllib3/util/ssl_.py�_const_compare_digest_backport s r Zcompare_digest)�wrap_socket� CERT_REQUIRED)�HAS_SNI)�PROTOCOL_TLS)�PROTOCOL_SSLv23)�OP_NO_SSLv2�OP_NO_SSLv3�OP_NO_COMPRESSION)i i i �:zECDHE+AESGCMzECDHE+CHACHA20z DHE+AESGCMzDHE+CHACHA20zECDH+AESGCMz DH+AESGCMzECDH+AESzDH+AESz RSA+AESGCMzRSA+AESz!aNULLz!eNULLz!MD5z!DSS)� SSLContextc @ s8 e Zd Zdd� Zdd� Zd dd�Zdd � Zddd�ZdS )r( c C s6 || _ d| _tj| _d | _d| _d | _d | _d | _ d S )NFr ) �protocol�check_hostname�sslZ CERT_NONE�verify_mode�ca_certs�options�certfile�keyfile�ciphers)�selfZprotocol_versionr r r �__init__k s zSSLContext.__init__c C s || _ || _d S �N)r/ r0 )r2 r/ r0 r r r �load_cert_chainv s zSSLContext.load_cert_chainNc C s || _ |d k rtd��d S )Nz-CA directories not supported in older Pythons)r- r )r2 ZcafileZcapathr r r �load_verify_locationsz s z SSLContext.load_verify_locationsc C s || _ d S r4 �r1 )r2 Zcipher_suiter r r �set_ciphers� s zSSLContext.set_ciphersFc C s>