]>
git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.recursor-dnssec/test_basicNSEC3.py
1 from __future__
import print_function
2 from basicDNSSEC
import BasicDNSSEC
6 class basicNSEC3(BasicDNSSEC
):
8 _confdir
= 'basicNSEC3'
11 def secureZone(cls
, confdir
, zonename
, key
=None):
12 zone
= '.' if zonename
== 'ROOT' else zonename
14 pdnsutilCmd
= [os
.environ
['PDNSUTIL'],
15 '--config-dir=%s' % confdir
,
19 keyfile
= os
.path
.join(confdir
, 'dnssec.key')
20 with
open(keyfile
, 'w') as fdKeyfile
:
23 pdnsutilCmd
= [os
.environ
['PDNSUTIL'],
24 '--config-dir=%s' % confdir
,
31 print(' '.join(pdnsutilCmd
))
33 subprocess
.check_output(pdnsutilCmd
, stderr
=subprocess
.STDOUT
)
34 except subprocess
.CalledProcessError
as e
:
38 params
= "1 0 100 AABBCCDDEEFF112233"
40 if zone
== "optout.example":
41 params
= "1 1 100 AABBCCDDEEFF112233"
43 pdnsutilCmd
= [os
.environ
['PDNSUTIL'],
44 '--config-dir=%s' % confdir
,
49 print(' '.join(pdnsutilCmd
))
51 subprocess
.check_output(pdnsutilCmd
, stderr
=subprocess
.STDOUT
)
52 except subprocess
.CalledProcessError
as e
: