]>
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
:
35 raise AssertionError('%s failed (%d): %s' % (pdnsutilCmd
, e
.returncode
, e
.output
))
37 params
= "1 0 50 AABBCCDDEEFF112233"
39 if zone
== "optout.example":
40 params
= "1 1 50 AABBCCDDEEFF112233"
42 pdnsutilCmd
= [os
.environ
['PDNSUTIL'],
43 '--config-dir=%s' % confdir
,
48 print(' '.join(pdnsutilCmd
))
50 subprocess
.check_output(pdnsutilCmd
, stderr
=subprocess
.STDOUT
)
51 except subprocess
.CalledProcessError
as e
:
52 raise AssertionError('%s failed (%d): %s' % (pdnsutilCmd
, e
.returncode
, e
.output
))