/usr/lib/rads/venv/lib/python3.13/site-packages/dns/__pycache__
NameSizeModeActions
asyncbackend.cpython-313.pyc34550644editdlrm
asyncquery.cpython-313.pyc376610644editdlrm
asyncresolver.cpython-313.pyc208710644editdlrm
dnssec.cpython-313.pyc514610644editdlrm
dnssectypes.cpython-313.pyc20700644editdlrm
e164.cpython-313.pyc48490644editdlrm
edns.cpython-313.pyc258940644editdlrm
entropy.cpython-313.pyc61100644editdlrm
enum.cpython-313.pyc49300644editdlrm
exception.cpython-313.pyc74740644editdlrm
flags.cpython-313.pyc30980644editdlrm
grange.cpython-313.pyc17750644editdlrm
immutable.cpython-313.pyc38280644editdlrm
inet.cpython-313.pyc65810644editdlrm
ipv4.cpython-313.pyc27190644editdlrm
ipv6.cpython-313.pyc69210644editdlrm
message.cpython-313.pyc859310644editdlrm
name.cpython-313.pyc490600644editdlrm
namedict.cpython-313.pyc43540644editdlrm
nameserver.cpython-313.pyc147060644editdlrm
node.cpython-313.pyc163490644editdlrm
opcode.cpython-313.pyc31400644editdlrm
query.cpython-313.pyc645170644editdlrm
rcode.cpython-313.pyc44530644editdlrm
rdata.cpython-313.pyc386500644editdlrm
rdataclass.cpython-313.pyc35370644editdlrm
rdataset.cpython-313.pyc226570644editdlrm
rdatatype.cpython-313.pyc102390644editdlrm
renderer.cpython-313.pyc159450644editdlrm
resolver.cpython-313.pyc880070644editdlrm
reversename.cpython-313.pyc46930644editdlrm
rrset.cpython-313.pyc123170644editdlrm
serial.cpython-313.pyc54210644editdlrm
set.cpython-313.pyc121210644editdlrm
tokenizer.cpython-313.pyc265250644editdlrm
transaction.cpython-313.pyc288830644editdlrm
tsig.cpython-313.pyc171680644editdlrm
tsigkeyring.cpython-313.pyc28710644editdlrm
ttl.cpython-313.pyc25350644editdlrm
update.cpython-313.pyc161190644editdlrm
version.cpython-313.pyc7620644editdlrm
versioned.cpython-313.pyc148000644editdlrm
win32util.cpython-313.pyc99290644editdlrm
wire.cpython-313.pyc55500644editdlrm
xfr.cpython-313.pyc146710644editdlrm
zone.cpython-313.pyc662180644editdlrm
zonefile.cpython-313.pyc343180644editdlrm
zonetypes.cpython-313.pyc14160644editdlrm
_asyncbackend.cpython-313.pyc49850644editdlrm
_asyncio_backend.cpython-313.pyc145780644editdlrm
_ddr.cpython-313.pyc79590644editdlrm
_features.cpython-313.pyc32360644editdlrm
_immutable_ctx.cpython-313.pyc33350644editdlrm
_trio_backend.cpython-313.pyc137510644editdlrm
__init__.cpython-313.pyc7020644editdlrm
Edit: /usr/lib/rads/venv/lib/python3.13/site-packages/dns/__pycache__/dnssec.cpython-313.pyc (51461B)
jSrSSKrSSKrSSKrSSKrSSKrSSKrSSKJr SSKJ r J r J r J r J r JrJrJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJrJrJ r SSKJ!r!J"r"J#r#J$r$ SSK%J&r& SSK'J(r( SS K)J*r* SS K+J,r, SS K-J.r.J/r/ SS K0J1r1 SS K2J3r3J4r4 SSK5J6r6 \Sr7\Sr8\ \RrRt\RvRx/S4r=S\>S\4Sjr?S\\\@4S\>4SjrAS\\\>\B\@4S\@4SjrCS\\*\&4S\@4SjrD"SS5rE"SS\E5rF\F"\R\R\R\R1\R\R\R1\R\R\R1\R15rN\F"\O"5\O"5\O"5\O"55rP\NrQSaS\\RR\>4S\RRS\\\>4S \ \RRS!\ \ES"\VS\,4S#jjrWSbS\\RR\>4S\RRS\\\>4S \ \RRS\(4 S$jjrXS%\ \RR\\RR\RR44S&\3S\ \ \*4S'jr]S(\\RvRx\\RR\RR44S\\RR\RR44S)jr^S*\_S+\_S\*SS4S,jr`ScS(\\RvRx\\RR\RR44S&\3S%\ \RR\\RR\RR44S \ \RRS-\ \BS!\ \ESS4S.jjraScS(\\RvRx\\RR\RR44S/\\RvRx\\RR\RR44S%\ \RR\\RR\RR44S \ \RRS-\ \BS!\ \ESS4S0jjrbSdS(\\RvRx\\RR\RR44S2\8S3\RRS4\*S5\ \\\>\@\B4S6\ \\\>\@\B4S7\ \@S8\VS!\ \ES \ \RRS9\VS\34S:jjrcSbS(\\RvRx\\RR\RR44S&\3S \ \RRS\_4S;jjrd\6RS<4S=\7S\\@\>4S>\@S?\@S\*4 S@jjrf\6RS<4S=\7S\\@\>4S>\@S?\@S\&4 SAjjrgSB\\RR\>4SC\ \\>\_4SD\@S\\@\>4S\>4 SEjrhSbS(\\RvRx\\RR\RR44SF\ \\\>4S \ \RRS\RR4SGjjriSH\RRS\RR4SIjrjSbS\\RR\>4SH\RRS\\\>4S \ \RRS\RR4 SJjjrkSH\RRS\RR4SKjrlSeSL\RrRtS(\RvRxS3\RRSM\ \\8\*4SN\ \\8\*4S5\ \\\>\@\B4S6\ \\\>\@\B4S7\ \@S!\ \ES \ \RRS9\VSS4SOjjrmSfSP\RRSL\ \RrRtS%\ \ \\8\*4SQ\VSR\ \@S5\ \\\>\@\B4S6\ \\\>\@\B4S7\ \@SS\ \1ST\ \=S!\ \ES9\VSS4SUjjrpSbSP\RRSL\RrRtST\ \=SS4SVjjrqSWrr\RRSX5(aASSYKuJvrv SSZKwJxrx SS[KwJyry SS\KwJzrz SS]KwJ{r{ SS^KwJ|r| SS_K}J~r~Jr SS`KJrJr \br\ar\cr\fr\grS1rO \rr\rr\rr\rr\rrSr\RrG\GRr\RrH\GRr\GRr\RrI\GRr\GRr\GRr\RrJ\GRr\GR r\GR"r\GR$r\GR&r\GR(r\GR*rg)gz.Common DNSSEC-related functions and constants.N)datetime)CallableDictListOptionalSetTupleUnioncast) AlgorithmDSDigest NSEC3Hash)AlgorithmKeyMismatchDeniedByPolicyUnsupportedAlgorithmValidationFailure)CDNSKEY)CDS)DNSKEY)DS)NSECBitmap) NSEC3PARAM)RRSIGsigtime_to_posixtime)Flag)GenericPublicKeyzrsa.RSAPublicKeyzec.EllipticCurvePublicKeyzed25519.Ed25519PublicKeyzed448.Ed448PublicKey)GenericPrivateKeyzrsa.RSAPrivateKeyzec.EllipticCurvePrivateKeyzed25519.Ed25519PrivateKeyzed448.Ed448PrivateKeytextreturnc.[R"U5$)zConvert text into a DNSSEC algorithm value. *text*, a ``str``, the text to convert to into an algorithm value. Returns an ``int``. )r from_text)rs =/usr/lib/rads/venv/lib/python3.13/site-packages/dns/dnssec.pyalgorithm_from_textr$Ls   t $$valuec.[R"U5$)zConvert a DNSSEC algorithm value to text *value*, a ``dns.dnssec.Algorithm``. Returns a ``str``, the name of a DNSSEC algorithm. )r to_textr&s r#algorithm_to_textr*Ws   U ##r%c"[U[5(a[UR55$[U[5(a [ U5$[U[ 5(a [U5$[U[5(aU$[S5e)z%Convert various format to a timestampzUnsupported timestamp type) isinstancerint timestampstrrfloat TypeErrorr)s r# to_timestampr2bsn%""5??$%% E3  #E** E5 ! !5z E3   455r%keycdUR5nUceUR[R:XaUSS-US-$Sn[ [ U5S-5HnX!SU-S-USU-S--- nM [ U5S-S:waX![ U5S- S-- nX"S- S-- nUS-$) zReturn the key id (a 16-bit number) for the specified key. *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` Returns an ``int`` between 0 and 65535 ri)to_wire algorithmr RSAMD5rangelen)r3rdatatotalis r#key_idrCps KKME    }} (((b Q%)++s5zQ'A AEla'5Q+;; ;E( u:>Q  3u:>*a/ /E 2+''v~r%cb\rSrSrSrS\S\4SjrS\S\4SjrS\ S\4Sjr S\ S\4Sjr S r g ) PolicycgN)selfs r#__init__Policy.__init__s r%_r cgNFrIrJrMs r# ok_to_signPolicy.ok_to_signr%cgrOrIrPs r#ok_to_validatePolicy.ok_to_validaterSr%cgrOrIrPs r#ok_to_create_dsPolicy.ok_to_create_dsrSr%cgrOrIrPs r#ok_to_validate_dsPolicy.ok_to_validate_dsrSr%rIN) __name__ __module__ __qualname____firstlineno__rKrboolrQrUr rXr[__static_attributes__rIr%r#rErEsS Ft4d8r%rEcp^\rSrSrU4SjrS\S\4SjrS\S\4SjrS\ S\4Sjr S\ S\4S jr S r U=r $) SimpleDenycR>[TU]5 XlX lX0lX@lgrH)superrK _deny_sign_deny_validate_deny_create_ds_deny_validate_ds)rJ deny_sign deny_validatedeny_create_dsdeny_validate_ds __class__s r#rKSimpleDeny.__init__s% #+-!1r%r3r c4URUR;$rH)r<rhrJr3s r#rQSimpleDeny.ok_to_signs}}DOO33r%c4URUR;$rH)r<rirss r#rUSimpleDeny.ok_to_validates}}D$7$777r%r<cXR;$rH)rjrJr<s r#rXSimpleDeny.ok_to_create_dss 4 444r%cXR;$rH)rkrxs r#r[SimpleDeny.ok_to_validate_dss 6 666r%)rjrhrirk)r]r^r_r`rKrrarQrUr rXr[rb __classcell__)rps@r#rdrdsY24f448&8T855d578777r%rdFnamer<originpolicy validatingc Uc[n[U[5(a[UR 5nU(a URnO URnU"U5(d[e[U[[45(d [S5eU[R:Xa[R"5nOcU[R :Xa[R""5nO9U[R$:Xa[R&"5nO[ SUS35e[U[5(a[(R*R-X5nUR/5R15nUR1US9n UbU ceUR3U5 UR3U 5 UR55n [6R8"S[;U5UR<U5U -n [(R>RA[(RBRD[(RFRHU S[KU 55n [M[HU 5$![ a [ SUS35ef=f)aOCreate a DS record for a DNSSEC key. *name*, a ``dns.name.Name`` or ``str``, the owner name of the DS record. *key*, a ``dns.rdtypes.ANY.DNSKEY.DNSKEY`` or ``dns.rdtypes.ANY.DNSKEY.CDNSKEY``, the key the DS is about. *algorithm*, a ``str`` or ``int`` specifying the hash algorithm. The currently supported hashes are "SHA1", "SHA256", and "SHA384". Case does not matter for these strings. *origin*, a ``dns.name.Name`` or ``None``. If *key* is a relative name, then it will be made absolute using the specified origin. *policy*, a ``dns.dnssec.Policy`` or ``None``. If ``None``, the default policy, ``dns.dnssec.default_policy`` is used; this policy defaults to that of RFC 8624. *validating*, a ``bool``. If ``True``, then policy is checked in validating mode, i.e. "Is it ok to validate using this digest algorithm?". Otherwise the policy is checked in creating mode, i.e. "Is it ok to create a DS with this digest algorithm?". Raises ``UnsupportedAlgorithm`` if the algorithm is unknown. Raises ``DeniedByPolicy`` if the algorithm is denied by policy. Returns a ``dns.rdtypes.ANY.DS.DS`` unsupported algorithm ""zkey is not a DNSKEY/CDNSKEYr~z!HBBr)'default_policyr,r/r upper Exceptionrr[rXrrr ValueErrorSHA1hashlibsha1SHA256sha256SHA384sha384dnsr}r" canonicalizer;updatedigeststructpackrCr<r@ from_wire rdataclassIN rdatatyperr?r ) r}r3r<r~rrcheckdshashwirekwirerdsrdatadss r#make_dsrsJ~K i % % !23I((&&    cFG, - -677HMM! hoo %! hoo %!"%s3%Qxq!!zz5  r%sigdatac[U5RnURU5nUR X5 g![a [ S5ef=f)Nzinvalid public key)get_algorithm_cls_from_dnskey public_cls from_dnskeyrrverify)rrr3r public_keys r#_validate_signaturerGsT.s3>>J6++C0 c  6 4556s :AnowcUc[n[X!5nUc [S5eUc[R"5nURU:a [S5eUR U:a [S5e[ XU5nUH2nURU5(dM[URXx5 g [S5e![[4a MTf=f)a~Validate an RRset against a single signature rdata, throwing an exception if validation is not successful. *rrset*, the RRset to validate. This can be a ``dns.rrset.RRset`` or a (``dns.name.Name``, ``dns.rdataset.Rdataset``) tuple. *rrsig*, a ``dns.rdata.Rdata``, the signature to validate. *keys*, the key dictionary, used to find the DNSKEY associated with a given name. The dictionary is keyed by a ``dns.name.Name``, and has ``dns.node.Node`` or ``dns.rdataset.Rdataset`` values. *origin*, a ``dns.name.Name`` or ``None``, the origin to use for relative names. *now*, a ``float`` or ``None``, the time, in seconds since the epoch, to use as the current time when validating. If ``None``, the actual current time is used. *policy*, a ``dns.dnssec.Policy`` or ``None``. If ``None``, the default policy, ``dns.dnssec.default_policy`` is used; this policy defaults to that of RFC 8624. Raises ``ValidationFailure`` if the signature is expired, not yet valid, the public key is invalid, the algorithm is unknown, the verification fails, etc. Raises ``UnsupportedAlgorithm`` if the algorithm is recognized by dnspython but not implemented. Nz unknown keyexpiredz not yet validzverify failure) rrrtime expiration inception_make_rrsig_signature_datarUr signatureInvalidSignature) rrrr~rrcandidate_keysr candidate_keys r#_validate_rrsigrQsP~)$6N .. {iik # ** 00 %eF ;D( $$]33    E  ( , -- !"34   sCCCrrsigsetc nUc[n[U[5(a8[RR U[RR 5n[U[5(aUSnO URn[U[5(a USnUSnOURnUnURU5nURU5nXg:wa [S5eUH1n [U [5(d [S5e[X X#XE5 g [S5e![[4a MSf=f)aaValidate an RRset against a signature RRset, throwing an exception if none of the signatures validate. *rrset*, the RRset to validate. This can be a ``dns.rrset.RRset`` or a (``dns.name.Name``, ``dns.rdataset.Rdataset``) tuple. *rrsigset*, the signature RRset. This can be a ``dns.rrset.RRset`` or a (``dns.name.Name``, ``dns.rdataset.Rdataset``) tuple. *keys*, the key dictionary, used to find the DNSKEY associated with a given name. The dictionary is keyed by a ``dns.name.Name``, and has ``dns.node.Node`` or ``dns.rdataset.Rdataset`` values. *origin*, a ``dns.name.Name``, the origin to use for relative names; defaults to None. *now*, an ``int`` or ``None``, the time, in seconds since the epoch, to use as the current time when validating. If ``None``, the actual current time is used. *policy*, a ``dns.dnssec.Policy`` or ``None``. If ``None``, the default policy, ``dns.dnssec.default_policy`` is used; this policy defaults to that of RFC 8624. Raises ``ValidationFailure`` if the signature is expired, not yet valid, the public key is invalid, the algorithm is unknown, the verification fails, etc. Nrr9zowner names do not matchzexpected an RRSIGzno RRSIGs validated) rr,r/rr}r"rootrchoose_relativityrrrr) rrrr~rrrrname rrsigname rrsigrdatasetrs r# _validatersN~&###FCHHMM:%q(E""QK   MM   % %f -F++F3I  :;;%''#$78 8  E$ D   1 22"#78   s D  D43D4T private_keyrdnskeyrrlifetimer deterministicc Uc[nURU5(d[e[U[5(a3USR n USR n USn USRnO0UR n UR n URn URnUb [U5nO[[R"55nUb [U5nOUbX-nO [S5eU bU RU 5n [U 5S- nU R5(aUS-n[!U ["R$R U UR&UUUU[)U5USS9 n["R*R-UUU 5n[U[.5(aUnO[1U5nU"US9nUR7UXz5n[9[ UR;US95$![2a [5S5ef=f) aSign RRset using private key. *rrset*, the RRset to validate. This can be a ``dns.rrset.RRset`` or a (``dns.name.Name``, ``dns.rdataset.Rdataset``) tuple. *private_key*, the private key to use for signing, a ``cryptography.hazmat.primitives.asymmetric`` private key class applicable for DNSSEC. *signer*, a ``dns.name.Name``, the Signer's name. *dnskey*, a ``DNSKEY`` matching ``private_key``. *inception*, a ``datetime``, ``str``, ``int``, ``float`` or ``None``, the signature inception time. If ``None``, the current time is used. If a ``str``, the format is "YYYYMMDDHHMMSS" or alternatively the number of seconds since the UNIX epoch in text form; this is the same the RRSIG rdata's text form. Values of type `int` or `float` are interpreted as seconds since the UNIX epoch. *expiration*, a ``datetime``, ``str``, ``int``, ``float`` or ``None``, the signature expiration time. If ``None``, the expiration time will be the inception time plus the value of the *lifetime* parameter. See the description of *inception* above for how the various parameter types are interpreted. *lifetime*, an ``int`` or ``None``, the signature lifetime in seconds. This parameter is only meaningful if *expiration* is ``None``. *verify*, a ``bool``. If set to ``True``, the signer will verify signatures after they are created; the default is ``False``. *policy*, a ``dns.dnssec.Policy`` or ``None``. If ``None``, the default policy, ``dns.dnssec.default_policy`` is used; this policy defaults to that of RFC 8624. *origin*, a ``dns.name.Name`` or ``None``. If ``None``, the default, then all names in the rrset (including its owner name) must be absolute; otherwise the specified origin will be used to make names absolute when signing. *deterministic*, a ``bool``. If ``True``, the default, use deterministic (reproducible) signatures when supported by the algorithm used for signing. Currently, this only affects ECDSA. Raises ``DeniedByPolicy`` if the signature is denied by policy. r9rz(expiration or lifetime must be specifiedr%) rr type_coveredr<labels original_ttlrrrrrr3zUnsupported key algorithm)r)rrQrr,rrrttlr}r2r-rr derelativizer?is_wildrrrr<rCdnssecrrrrr1signr replace)rrrrrrrrrr~rrrrrrrsig_inceptionrrsig_expirationrrrsig_templater signing_key private_clsrs r#_signrst~   V $ $%(""qqQx|| --yy &y1diik*' 3  *5CDD$$V, [1_F~~! }}""""!#!v N :: 0 0 OD+011!  97?K%+6K  v=I ~-- -B CC $ 978 8 9s !G!!G7c[U[5(a8[RR U[RR 5nUR nUR5(dUc [S5eURU5n[U5upESnURUS9nUceXgSS- nXaR RU5- nUR5(dUc [S5eURU5n[U5nUR5(aURUS- :wa [S5eUS- UR:a [S 5eURUS- :aAUR!URS-5Sn [RR S U 5nUR5n ["R$"S UR&UR(UR*5n UV s/sHoRU5PM n n [-U 5H3n Xj- nXk- n["R$"S [U 55nXn- nXl- nM5 U$s sn f) aCreate signature rdata. *rrset*, the RRset to sign/validate. This can be a ``dns.rrset.RRset`` or a (``dns.name.Name``, ``dns.rdataset.Rdataset``) tuple. *rrsig*, a ``dns.rdata.Rdata``, the signature to validate, or the signature template used when signing. *origin*, a ``dns.name.Name`` or ``None``, the origin to use for relative names. Raises ``UnsupportedAlgorithm`` if the algorithm is recognized by dnspython but not implemented. Nz,relative RR name without an origin specifiedr%rr8z&wild owner name has wrong label lengthr9z#owner name longer than RRSIG labels*z!HHIz!H)r,r/rr}r"rr is_absoluterrrr; to_digestabler?rrsplitrrrrrsorted)rrr~rrrrrname_lensuffix rrnamebufrrfixedr@rdatasrrlens r#rr_s*&###FCHHMM: \\F      >#$RS S$$V,,E2F D === 'D   "IDLL & &v ..D      >#$RS S$$V,6{H ~~ELLHqL8 HII!|ell" EFF 1 $ellQ./2##C0$$&Ikk&(//83C3CUEWEWXG7? @xe!!&)xF @   D#e*-     KAsI$rrrrc[R"U5n[U[5(aUR X#S9$[ U5R nU"US9R X#S9$)aTConvert a public key to DNSKEY Rdata *public_key*, a ``PublicKey`` (``GenericPublicKey`` or ``cryptography.hazmat.primitives.asymmetric``) to convert. *algorithm*, a ``str`` or ``int`` specifying the DNSKEY algorithm. *flags*: DNSKEY flags field as an integer. *protocol*: DNSKEY protocol field as an integer. Raises ``ValueError`` if the specified key algorithm parameters are not unsupported, ``TypeError`` if the key type is unsupported, `UnsupportedAlgorithm` if the algorithm is unknown and `AlgorithmKeyMismatch` if the algorithm does not match the key type. Return DNSKEY ``Rdata``. )rrr)r maker,r to_dnskeyget_algorithm_clsr)rr<rrrs r# _make_dnskeyrs_2y)I*.//##%#CC&y1<< j)33%3SSr%c [XX#5n[UR[RRUR UR URURS9$)aeConvert a public key to CDNSKEY Rdata *public_key*, the public key to convert, a ``cryptography.hazmat.primitives.asymmetric`` public key class applicable for DNSSEC. *algorithm*, a ``str`` or ``int`` specifying the DNSKEY algorithm. *flags*: DNSKEY flags field as an integer. *protocol*: DNSKEY protocol field as an integer. Raises ``ValueError`` if the specified key algorithm parameters are not unsupported, ``TypeError`` if the key type is unsupported, `UnsupportedAlgorithm` if the algorithm is unknown and `AlgorithmKeyMismatch` if the algorithm does not match the key type. Return CDNSKEY ``Rdata``. rrrrr<r3) rrrrrrrr<r3)rr<rrrs r# _make_cdnskeyrsO4* AF }}$$ll"" JJ  r%domainsalt iterationsc[RSS5n[U[5(a[UR 5nU[R:wa [ S5eUcSnOJ[U[5(a3[U5S-S:Xa[RU5nO [ S5eUn[U[RR5(d[RRU5nUR5R!5nUce["R$"Xe-5R'5n[)U5H)n["R$"Xu-5R'5nM+ [*R,"U5R/S5n U R1U5n U $![ a [ S5ef=f) a Calculate the NSEC3 hash, according to https://tools.ietf.org/html/rfc5155#section-5 *domain*, a ``dns.name.Name`` or ``str``, the name to hash. *salt*, a ``str``, ``bytes``, or ``None``, the hash salt. If a string, it is decoded as a hex string. *iterations*, an ``int``, the number of iterations. *algorithm*, a ``str`` or ``int``, the hash algorithm. The only defined algorithm is SHA1. Returns a ``str``, the encoded NSEC3 hash. ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 0123456789ABCDEFGHIJKLMNOPQRSTUVz-Wrong hash algorithm (only SHA1 is supported)r%r8rzInvalid salt lengthzutf-8)r/ maketransr,rrrrrr?bytesfromhexrr}Namer"rr;rrrr>base64 b32encodedecode translate) rrrr<b32_conversion salt_encodeddomain_encodedrrMoutputs r# nsec3_hashrs|.]]*,NNJ i % %!)//"34IINN"HII | D#   t9q=A  ==.L23 3 fchhmm , ,##F+((*224N  %% % \\.7 8 ? ? AF : f34;;=  f % , ,W 5F   n -F M9 JHIIJs ,F44G  algorithmsc [U5up4UR[RR[RR [RR 4;a [S5e[5nUHAn[U[5(a[UR5nURU5 MC UR[RR :Xa{/n[!U5H&nUR"U;dMUR%U5 M( ['U5S:Xa [S5e[R(R+UR,U5$/nUHnUR/[1X4Xb55 M [R(R+UR,U5$![a [SUS35ef=f)aCreate a DS record from DNSKEY/CDNSKEY/CDS. *rrset*, the RRset to create DS Rdataset for. This can be a ``dns.rrset.RRset`` or a (``dns.name.Name``, ``dns.rdataset.Rdataset``) tuple. *algorithms*, a set of ``str`` or ``int`` specifying the hash algorithms. The currently supported hashes are "SHA1", "SHA256", and "SHA384". Case does not matter for these strings. If the RRset is a CDS, only digest algorithms matching algorithms are accepted. *origin*, a ``dns.name.Name`` or ``None``. If `key` is a relative name, then it will be made absolute using the specified origin. Raises ``UnsupportedAlgorithm`` if any of the algorithms are unknown and ``ValueError`` if the given RRset is not usable. Returns a ``dns.rdataset.Rdataset`` zrrset not a DNSKEY/CDNSKEY/CDSrrrzno acceptable CDS rdata found)rrrrrrrrsetr,r/r rrraddcds_rdataset_to_ds_rdatasetrappendr?rfrom_rdata_listrextenddnskey_rdataset_to_cds_rdataset) rrr~rr _algorithmsr<resr@s r#make_ds_rdatasetr (sz2,E2F    9::%K  O)S))$Y__%67   "  #--+++0:E  K/ 5!; s8q=<= =||++HLL#>> C  26YWX! << ' ' c ::! O&)@ 1'MN N Os ,F88Grc UR[RR:wa [ S5e/nUHjnUR [UR [RRURURURURS95 Ml [RRURU5$)zCreate a CDS record from DS. *rdataset*, a ``dns.rdataset.Rdataset``, to create DS Rdataset for. Raises ``ValueError`` if the rdataset is not CDS. Returns a ``dns.rdataset.Rdataset`` zrdataset not a CDSr)rrrrrrrrrr<rrrrrrrr@s r#rrbs#--+++-.. C  }}'' //!--||    << ' ' c ::r%c <UR[RR[RR4;a [ S5e/nUHnUR [XX#55 M [RRURU5$)aCreate a CDS record from DNSKEY/CDNSKEY. *name*, a ``dns.name.Name`` or ``str``, the owner name of the CDS record. *rdataset*, a ``dns.rdataset.Rdataset``, to create DS Rdataset for. *algorithm*, a ``str`` or ``int`` specifying the hash algorithm. The currently supported hashes are "SHA1", "SHA256", and "SHA384". Case does not matter for these strings. *origin*, a ``dns.name.Name`` or ``None``. If `key` is a relative name, then it will be made absolute using the specified origin. Raises ``UnsupportedAlgorithm`` if the algorithm is unknown or ``ValueError`` if the rdataset is not DNSKEY/CDNSKEY. Returns a ``dns.rdataset.Rdataset`` zrdataset not a DNSKEY/CDNSKEY) rrrrrrrrrrr)r}rr<r~rr@s r#rrsr2s}}33S]]5J5JKK899 C 8D;< << ' ' c ::r%c UR[RR:wa [ S5e/nUH\nUR [ URURURURURURS95 M^ [RRURU5$)zCreate a CDNSKEY record from DNSKEY. *rdataset*, a ``dns.rdataset.Rdataset``, to create CDNSKEY Rdataset for. Returns a ``dns.rdataset.Rdataset`` zrdataset not a DNSKEYr)rrrrrrrrrrr<r3rrrr"s r##dnskey_rdataset_to_cdnskey_rdatasetr%s#--...011 C  ((kk//II    << ' ' c ::r%txnkskszsksc UR[[RRR [RRR [RRR/5;aUn OUn U HRup[RRUU U UUUUUU U S9 nURURURU5 MT g)zDefault RRset signer) rrrrrrrrr~rN) rrrr RdataTyperrrrrrr}r)r&rrr'r(rrrrr~rrrrrs r#default_rrset_signerr+s ||s MM # # * * MM # # ' ' MM # # + + #  #!'    EIIu- $r%zone add_dnskey dnskey_ttlnsec3 rrset_signerc /n /n U(aeUHLnUSR[R-(aU RU5 M;U RU5 MN U (dUn U (dUn O/nU(a[R "U5nOUR 5nURc [S5eUnU(aUcURUR[RR5nU(a URnO@URUR[RR5nURnUH#unnURURUU5 M% U(a [!S5eU =(d5 ["R$"[&URU U UUUU URU S9 n[)UUU5sSSS5 $!,(df  g=f)aSign zone. *zone*, a ``dns.zone.Zone``, the zone to sign. *txn*, a ``dns.transaction.Transaction``, an optional transaction to use for signing. *keys*, a list of (``PrivateKey``, ``DNSKEY``) tuples, to use for signing. KSK/ZSK roles are assigned automatically if the SEP flag is used, otherwise all RRsets are signed by all keys. *add_dnskey*, a ``bool``. If ``True``, the default, all specified DNSKEYs are automatically added to the zone on signing. *dnskey_ttl*, a``int``, specifies the TTL for DNSKEY RRs. If not specified the TTL of the existing DNSKEY RRset used or the TTL of the SOA RRset. *inception*, a ``datetime``, ``str``, ``int``, ``float`` or ``None``, the signature inception time. If ``None``, the current time is used. If a ``str``, the format is "YYYYMMDDHHMMSS" or alternatively the number of seconds since the UNIX epoch in text form; this is the same the RRSIG rdata's text form. Values of type `int` or `float` are interpreted as seconds since the UNIX epoch. *expiration*, a ``datetime``, ``str``, ``int``, ``float`` or ``None``, the signature expiration time. If ``None``, the expiration time will be the inception time plus the value of the *lifetime* parameter. See the description of *inception* above for how the various parameter types are interpreted. *lifetime*, an ``int`` or ``None``, the signature lifetime in seconds. This parameter is only meaningful if *expiration* is ``None``. *nsec3*, a ``NSEC3PARAM`` Rdata, configures signing using NSEC3. Not yet implemented. *rrset_signer*, a ``Callable``, an optional function for signing RRsets. The function requires two arguments: transaction and RRset. If the not specified, ``dns.dnssec.default_rrset_signer`` will be used. *deterministic*, a ``bool``. If ``True``, the default, use deterministic (reproducible) signatures when supported by the algorithm used for signing. Currently, this only affects ECDSA. Returns ``None``. r9Nzno zone originz&Signing with NSEC3 not yet implemented) rr'r(rrrrr~r)rrSEPr contextlib nullcontextwriterr~rrrrrrSOArNotImplementedError functoolspartialr+_sign_zone_nsec)r,r&rr-r.rrrr/r0rrr'r(r3cm_txnrsoarM _rrset_signers r# sign_zoner?s}v D D C1v||dhh& C  C  DD 0:0F0Fs0K [[] {{)** t !$++s}}/C/CD!'J((4;; 0A0ABC!$J! 6j&9" %&NO O( I,=,=${{#%!{{+ -M#4}=7 s ;DG G+c`S S[RRS[RRS[ [RRS[R RS[S[ [SS4S jjnUR5RnSnSn[UR55GH?nU(aURU5(aM#URU[R R"5(aXpR$:waUnOSnU(aUR'U5nU(aUR(Hn U R*[R R,:XaM-U(a*U R*[R R.:waM^[R0R2"XyR4/U Q76n U"X5 M UbU"XXpR6XB5 UnGMB U(a U"XUR$UR6XB5 gg) zNSEC zone signerNr&r} next_securerrr0r c p[[RRR[RRR /5nUR U5nU(aU(a[URVs/sHoRPM sn5U-n [R"[U 55n [RRUU[ U[RRR UU S95n URU 5 U(a U"X 5 ggggs snf)zNSEC zone signer helper)rrnextwindowsN)rrrr*rrget_node rdatasetsrr from_rdtypeslistr from_rdatar) r&r}rArrr0mandatory_typesrrtypesrDrs r# _txn_add_nsec&_sign_zone_nsec.._txn_add_nsec_s ]] $ $ * *CMM,C,C,H,H I ||D! KT^^D^__^DEW ))$u+6GII((#==2277$#  E GGENS(! 4DsD3rH)r transaction Transactionr}r rr RdataClassr- RRsetSignerget_soaminimumr iterate_names is_subdomainrrNSr~rErFrrrrrIrr) r,r&r0rL rrsig_ttl delegation last_securer}rrrs r#r:r:Xs/3 ) __ ( ()hhmm)chhmm,)** )  ) {+ ) )@ &&IJKs((*+ $++J77  WWT3==++ , ,1DJJ <<%D $H#--*=*== #3==;K;K(K # 4 4T<< S( S$S0!/  " #D,, X 9,< dkk4<< r%c[S5e)Nz.DNSSEC validation requires python cryptography) ImportError)argskwargss r# _need_pycar^s 8 r%r)r)dsa)ec)ed448)rsa)ed25519)rr)rr)NNFrH)NNN)NNNFNNT)NNNNNT) NNTNNNNNNNT)__doc__r r3r8rrrrtypingrrrrrr r r dns._featuresr dns.exceptiondns.namedns.node dns.rdatadns.rdataclass dns.rdataset dns.rdatatype dns.rrsetdns.transactiondns.zonedns.dnssectypesr r rrrrrdns.rdtypes.ANY.CDNSKEYrdns.rdtypes.ANY.CDSrdns.rdtypes.ANY.DNSKEYrdns.rdtypes.ANY.DSrdns.rdtypes.ANY.NSECrrdns.rdtypes.ANY.NSEC3PARAMrdns.rdtypes.ANY.RRSIGrrdns.rdtypes.dnskeybaser PublicKey PrivateKeyrNrOrRRsetrQr/r$r-r*r0r2rCrErdr=DSA DSANSEC3SHA1ECCGOSTNULLrGOSTrfc_8624_policyrallow_all_policyrr}r r@RdatararrrRdatasetrrrrr rrrrrrrrrr rrr%r+r,Zoner?r:r^ _featureshavecryptography.exceptionsr)cryptography.hazmat.primitives.asymmetricr_r`rarbrcdns.dnssecalgsrrdns.dnssecalgs.baserrvalidatevalidate_rrsigr make_dnskey make_cdnskey _have_pycaDHECCRSASHA1RSASHA1NSEC3SHA1 RSASHA256 RSASHA512ECDSAP256SHA256ECDSAP384SHA384ED25519ED448INDIRECT PRIVATEDNS PRIVATEOIDrIr%r#rs $5 JJJ:: ,#)!-1='    33SYY__EtKL %c%i%$U9c>2$s$ 6hUC78 6S 6fgo&3,"77*y}}i&<&O>OPy}}i&<&<= ]]HMM8==1 ]]O ceSUCE359!'+# J  s" #J JXs]#J SXX]] # J V  J  JJb'+ !  s" #! !Xs]#! SXX]] # !  !H sxx}}eCLL$9$9388==$HII JSX d6l(! % s||7L7L(L"MM N! 388==#,,// /0!!U!%!f!!'+# C. % s||7L7L(L"MM NC. C. sxx}}eCHHMM3<<3H3H$HII JC. SXX]] # C. % C. V  C. C.T'+# F3 % s||7L7L(L"MM NF3CIIOOU388==#,,:O:O+O%PPQF3 sxx}}eCHHMM3<<3H3H$HII JF3 SXX]] # F3 % F3 V  F3 F3\=A=A"#&*|D % s||7L7L(L"MM N|D|D HHMM|D  |D hS%789 |D xc589: |Dsm|D |D V |D SXX]] #|D|D |DD'+@ % s||7L7L(L"MM N@ @ SXX]] #@ @L T TS#X T  T T  TL ##S#X# # #  #L: #((--$ %: 5e$ %::S#X :  :@'+7; % s||7L7L(L"MM N7;E(C-()7; SXX]] #7; \\ 7;t;ll##;\\;B'+ ;  s" #;ll##;Xs]#; SXX]] # ;  \\ ;B;ll##;\\;B=A=A"#&*'.  $ $'. 99??'. HHMM'. uZ'( ) '. uZ'( ) '. hS%789 '.xc589:'.sm'. V '. SXX]] #'.'. '.X266: $<@=A""&*.#p> ((--p> #//-- .p> 4j&012 3p> p>  p> hS%789 p>xc589:p>smp> J p>;'p> V p>p> p>l+/L ((--L  $ $L ;'L  L ^ ==h8=<?=HH$N DK LJHN DKLJ   \\mmmm   %% --         ++++        ! !  ! ! r%