This commit is contained in:
cronekorkn 2023-08-01 19:03:08 +02:00
parent 5b0b2e77ce
commit 4567b66c60
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw

View file

@ -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',