관리-도구
편집 파일: ssl.cpython-39.opt-2.pyc
a R�f2� � @ s� d dl Z d dlZd dlmZ d dlmZmZm Z d dlZd dlmZm Z mZ d dlmZmZmZ d dlmZmZmZmZmZmZmZ d dlmZmZ d dlmZmZmZm Z zd d lm!Z! W n e"y� Y n0 d d lm#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z, d dlm-Z-m.Z. ej/de0d d� ed� e j/de0dd� ed� ej/de0dd� ed� ej/de0dd� ed� e j/de0dd� ed� ej/de0dd� ed� e1j2 Z3e1_3dd� e1j4�5� D �Z6e7e1dd�Z8G dd� de�Z9G dd � d e�Z:G d!d"� d"e�Z;G d#d$� d$e�Z<e j=d%k�rd d&lm>Z>m?Z? d d'l@m@Z@mAZAmBZB d d(l@mCZCmDZD d dl@ZEd dlFZFd dlGZGd dlHZHeIZJd)gZKeLed*�ZMe-ZNeZOd+d,� ZPd-d.� ZQd/d0� ZRd1d2� ZSed3d4�ZTd5d6� ZUG d7d8� d8ed8d9��ZVG d:d;� d;eVe�ZWG d<d=� d=e�ZXeWjYfdddd>�d?d@�ZZe2fe[dAeWjYddddddB�dCdD�Z\eZZ]e\Z^G dEdF� dF�Z_dGdH� Z`G dIdJ� dJe@�ZaeaeX_be_eX_cdddAe[e2ddKdKdf dLdM�ZddNdO� ZedPZfdQZgdRdS� ZhdTdU� Zie2dfdVdW�ZjdXdY� ZkdS )Z� N)� namedtuple)�Enum�IntEnum�IntFlag)�OPENSSL_VERSION_NUMBER�OPENSSL_VERSION_INFO�OPENSSL_VERSION)�_SSLContext� MemoryBIO� SSLSession)�SSLError�SSLZeroReturnError�SSLWantReadError�SSLWantWriteError�SSLSyscallError�SSLEOFError�SSLCertVerificationError)�txt2obj�nid2obj)�RAND_status�RAND_add� RAND_bytes�RAND_pseudo_bytes)�RAND_egd) �HAS_SNI�HAS_ECDH�HAS_NPN�HAS_ALPN� HAS_SSLv2� HAS_SSLv3� HAS_TLSv1�HAS_TLSv1_1�HAS_TLSv1_2�HAS_TLSv1_3)�_DEFAULT_CIPHERS�_OPENSSL_API_VERSION� _SSLMethodc C s | � d�o| dkS )NZ PROTOCOL_�PROTOCOL_SSLv23�� startswith��name� r, �(/opt/alt/python39/lib64/python3.9/ssl.py�<lambda>} � r. )�source�Optionsc C s | � d�S )NZOP_r( r* r, r, r- r. � r/ ZAlertDescriptionc C s | � d�S )NZALERT_DESCRIPTION_r( r* r, r, r- r. � r/ ZSSLErrorNumberc C s | � d�S )NZ SSL_ERROR_r( r* r, r, r- r. � r/ �VerifyFlagsc C s | � d�S )NZVERIFY_r( r* r, r, r- r. � r/ � VerifyModec C s | � d�S )NZCERT_r( r* r, r, r- r. � r/ c C s i | ]\}}||�qS r, r, )�.0r+ �valuer, r, r- � <dictcomp>� r/ r6 ZPROTOCOL_SSLv2c @ s6 e Zd ZejZejZejZ ej ZejZ ejZejZdS )� TLSVersionN)�__name__� __module__�__qualname__�_sslZPROTO_MINIMUM_SUPPORTEDZMINIMUM_SUPPORTEDZPROTO_SSLv3�SSLv3ZPROTO_TLSv1ZTLSv1Z PROTO_TLSv1_1ZTLSv1_1Z PROTO_TLSv1_2ZTLSv1_2Z PROTO_TLSv1_3ZTLSv1_3ZPROTO_MAXIMUM_SUPPORTEDZMAXIMUM_SUPPORTEDr, r, r, r- r7 � s r7 c @ s$ e Zd ZdZdZdZdZdZdZdS )�_TLSContentType� � � � � � N) r8 r9 r: �CHANGE_CIPHER_SPEC�ALERTZ HANDSHAKEZAPPLICATION_DATA�HEADERZINNER_CONTENT_TYPEr, r, r, r- r= � s r= c @ s� e Zd ZdZdZdZdZdZdZdZ dZ d Zd ZdZ dZd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#S )$� _TLSAlertTyper � r>