Commit 6c521f65 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

Merge branch 'crans'

parents 3f470382 3ab9f187
[submodule "re2oapi"]
path = re2oapi
url =
url =
......@@ -6,4 +6,10 @@ This service uses Re2o API to generate DNS zone files
## Requirements
* python3
* knot
* requirements in
## Scripts
* ``: Generates the zone files and reloads the zones
* ``: Generate the DS records for the zones in `dnssec_domains.json` and writes them to `dnssec.json`
import subprocess
def get_ds(zone, verbose=False):
if verbose:
print("Getting CDS of %s:" % (zone,))
print("/usr/sbin/knotc zone-read %s @ CDS" % (zone,))
cdss = subprocess.check_output(['/usr/sbin/knotc', 'zone-read', zone, '@', 'CDS'])[:-1].decode('utf-8').split('\n')
except subprocess.CalledProcessError:
return []
dss = []
if verbose:
print("CDS of %s = %s" % (zone, cdss))
for cds in cdss:
ds = {}
cds = cds.split(' ')
ds['subzone'] = cds[1]
ds['id'] = cds[4]
ds['algo'] = cds[5]
ds['type'] = cds[6]
ds['fp'] = cds[7]
if verbose:
print('Unable to find ksk for', zone)
ds['ttl'] = 172800
if verbose:
print("DS record of %s : %s" % (zone, ds))
return dss
This diff is collapsed.
Subproject commit 5b4523c797bffb90c998d5b424548756baa0c1d2
Subproject commit 6565b92f3bfc13d02b95888ae021f5bd6f7ef317
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment