From 4567b66c606678fcad7c8682c5e93e8d17c56b0c Mon Sep 17 00:00:00 2001 From: cronekorkn Date: Tue, 1 Aug 2023 19:03:08 +0200 Subject: [PATCH] wip --- libs/dnssec.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/dnssec.py b/libs/dnssec.py index 1e43136..990e66b 100755 --- a/libs/dnssec.py +++ b/libs/dnssec.py @@ -46,9 +46,13 @@ def generate_signing_key_pair(zone, salt, repo): crypto_serialization.PublicFormat.SubjectPublicKeyInfo ).decode().split('\n')[1:-2]) + dnskey_chunks = ' '.join( + dnskey[i:i+56] for i in range(0, len(dnskey), 56) + ) + return { 'dnskey': dnskey, - 'dnskey_record': f'{zone}. IN DNSKEY {flags} {protocol} {algorithm} {dnskey}', + 'dnskey_record': f'{zone}. IN DNSKEY {flags} {protocol} {algorithm} {dnskey_chunks}', 'key_id': _calc_keyid(flags, protocol, algorithm, dnskey), 'privkey_file': { 'Private-key-format': 'v1.3',