관리-도구
편집 파일: dnssec.cpython-38.pyc
U /?�f�� � @ s< d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z m Z mZmZm Z mZmZmZ ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZmZm Z ddlm!Z!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z( dd l)m*Z* dd l+m,Z, ddl-m.Z.m/Z/ ddl0m1Z1 dd l2m3Z3m4Z4 ddl5m6Z6 ed Z7ed Z8e ej9j:ej;j<gdf Z=e>ed�dd�Z?eee@f e>d�dd�ZAeee>eBe@f e@d�dd�ZCee*e&f e@d�dd�ZDG dd� d�ZEG dd� deE�ZFeFejGejHejIejJhejGejHejIhejKejLejMhejKh�ZNeFeO� eO� eO� eO� �ZPeNZQdeeejRjSe>f ejTjUeee>f eejRjS eeE eVe,d!�d"d#�ZWdfeejRjSe>f ejTjUeee>f eejRjS e(d$�d%d&�ZXe ejRjSeejYjZej[j\f f e3eee* d'�d(d)�Z]eej;j<eejRjSejYjZf f eejRjSejYjZf d*�d+d,�Z^e_e_e*dd-�d.d/�Z`dgeej;j<eejRjSejYjZf f e3e ejRjSeej[j\ejYjZf f eejRjS eeB eeE dd0�d1d2�Zadheej;j<eejRjSejYjZf f eej;j<eejRjSejYjZf f e ejRjSeej[j\ejYjZf f eejRjS eeB eeE dd3�d4d5�Zbdieej;j<eejRjSejYjZf f e8ejRjSe*eeee>e@eBf eeee>e@eBf ee@ eVeeE eejRjS e3d6�d7d8�Zcdjeej;j<eejRjSejYjZf f e3eejRjS e_d9�d:d;�Zde6jed<fe7ee@e>f e@e@e*d=�d>d?�Zfe6jed<fe7ee@e>f e@e@e&d=�d@dA�ZgeejRjSe>f eee>e_f e@ee@e>f e>dB�dCdD�Zhdkeej;j<eejRjSejYjZf f e eee>f eejRjS ejYjZdE�dFdG�ZiejYjZejYjZdH�dIdJ�ZjdleejRjSe>f ejYjZeee>f eejRjS ejYjZdK�dLdM�ZkejYjZejYjZdH�dNdO�Zldmej9j:ej;j<ejRjSeee8e*f eee8e*f eeee>e@eBf eeee>e@eBf ee@ eeE eejRjS ddP�dQdR�Zmdnejnjoeej9j: eeee8e*f eVee@ eeee>e@eBf eeee>e@eBf ee@ ee1 ee= eeE ddT�dUdV�Zpdoejnjoej9j:ee= ddW�dXdY�ZqdZd[� Zrejs�td\��r�dd]lumvZv dd^lwmxZx dd_lwmyZy dd`lwmzZz ddalwm{Z{ ddblwm|Z| ddcl}m~Z~mZ dddl�m�Z�m�Z� ebZ�eaZ�ecZ�efZ�egZ�dSZ�nerZ�erZ�erZ�erZ�erZ�d Z�ejGZGej�Z�ejHZHej�Z�ej�Z�ejIZIej�Z�ej�Z�ej�Z�ejJZJej�Z�ej�Z�ej�Z�ej�Z�ej�Z�ej�Z�ej�Z�dS )pz.Common DNSSEC-related functions and constants.� N)�datetime)�Callable�Dict�List�Optional�Set�Tuple�Union�cast)� Algorithm�DSDigest� NSEC3Hash)�AlgorithmKeyMismatch�DeniedByPolicy�UnsupportedAlgorithm�ValidationFailure)�CDNSKEY)�CDS)�DNSKEY)�DS)�NSEC�Bitmap)� NSEC3PARAM)�RRSIG�sigtime_to_posixtime)�Flag)�GenericPublicKeyzrsa.RSAPublicKeyzec.EllipticCurvePublicKeyzed25519.Ed25519PublicKeyzed448.Ed448PublicKey)�GenericPrivateKeyzrsa.RSAPrivateKeyzec.EllipticCurvePrivateKeyzed25519.Ed25519PrivateKeyzed448.Ed448PrivateKey)�text�returnc C s t �| �S )z�Convert text into a DNSSEC algorithm value. *text*, a ``str``, the text to convert to into an algorithm value. Returns an ``int``. )r � from_text)r � r! �8/opt/hc_python/lib/python3.8/site-packages/dns/dnssec.py�algorithm_from_textL s r# )�valuer c C s t �| �S )z�Convert a DNSSEC algorithm value to text *value*, a ``dns.dnssec.Algorithm``. Returns a ``str``, the name of a DNSSEC algorithm. )r Zto_text�r$ r! r! r"