fix write_named_trust_anchors in dns-generator

This commit is contained in:
JerryXiao 2022-12-05 22:35:03 +08:00
parent 8733a70456
commit 1696d5dd91
Signed by: Jerry
GPG Key ID: 22618F758B5BE2E5
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ def write_named_trust_anchors():
for entry in dnskeys_exported:
zone, records = entry['zone'], [r['dnskey'] for r in entry['records']]
for record in records:
contents.append(f" {zone:>{maxzonelen}s} static-key \"{record}\";")
a1, a2, a3, a4 = record.split(maxsplit=3)
contents.append(f" {zone:>{maxzonelen}s} static-key {a1} {a2} {a3} \"{a4}\";")
NAMED_TURST_ANCHORS_FILE.write_text(header + '\n'.join(contents) + footer)
def main():