From: Ralf Jung Date: Fri, 25 Dec 2015 10:21:44 +0000 (+0100) Subject: multi-NS secure delegation X-Git-Url: https://git.ralfj.de/zonemaker.git/commitdiff_plain/a683afa38cc20da20ad379ac9af280eae01433a2?ds=inline;hp=c30e7a92b069a85e69ac52723ad0c9844e475366 multi-NS secure delegation --- diff --git a/db.example.com.py b/db.example.com.py index 1087113..349d958 100644 --- a/db.example.com.py +++ b/db.example.com.py @@ -41,7 +41,7 @@ __zone__ = Zone('example.com.', serialfile = 'db.example.com.srl', 'orgstuff': CName('example.org.'), # CNAMEs cannot be combined with other records # 'sub1': Delegation('ns.example.org.', 'ns'), # this adds an NS record - 'sub2': SecureDelegation('ns.example.com.', 12345, Algorithm.RSA_SHA256, Digest.SHA256, '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF'), # this adds an NS and a DS record + 'sub2': SecureDelegation(12345, Algorithm.RSA_SHA256, Digest.SHA256, '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF', 'ns.example.com.'), # this adds an NS and a DS record # 'local': { 'one': Name(one4), diff --git a/zone.py b/zone.py index 5030e9c..7d692c1 100644 --- a/zone.py +++ b/zone.py @@ -296,12 +296,12 @@ def CName(name: str) -> Name: return Name(CNAME(name)) -def Delegation(name: str, *names) -> Name: - return Name(NS(name), list(map(NS, names))) +def Delegation(*names) -> Name: + return Name(list(map(NS, names))) -def SecureDelegation(name: str, tag: int, alg: int, digest: int, key: str) -> Name: - return Name(NS(name), DS(tag, alg, digest, key)) +def SecureDelegation(tag: int, alg: int, digest: int, key: str, *names) -> Name: + return Name(DS(tag, alg, digest, key), list(map(NS, names))) class Zone: