mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
python:tests/dns_base: let tkey_trans() take tkey_req_in_answers
It's possible to put the additional into the answers section, so we should be able to test that. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13019 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
f8dfa9b33b
commit
cd747307d8
@ -248,7 +248,8 @@ class DNSTKeyTest(DNSTest):
|
|||||||
self.creds.set_kerberos_state(credentials.MUST_USE_KERBEROS)
|
self.creds.set_kerberos_state(credentials.MUST_USE_KERBEROS)
|
||||||
self.newrecname = "tkeytsig.%s" % self.get_dns_domain()
|
self.newrecname = "tkeytsig.%s" % self.get_dns_domain()
|
||||||
|
|
||||||
def tkey_trans(self, creds=None, algorithm_name="gss-tsig"):
|
def tkey_trans(self, creds=None, algorithm_name="gss-tsig",
|
||||||
|
tkey_req_in_answers=False):
|
||||||
"Do a TKEY transaction and establish a gensec context"
|
"Do a TKEY transaction and establish a gensec context"
|
||||||
|
|
||||||
if creds is None:
|
if creds is None:
|
||||||
@ -297,6 +298,10 @@ class DNSTKeyTest(DNSTest):
|
|||||||
r.rdata = rdata
|
r.rdata = rdata
|
||||||
|
|
||||||
additional = [r]
|
additional = [r]
|
||||||
|
if tkey_req_in_answers:
|
||||||
|
p.ancount = 1
|
||||||
|
p.answers = additional
|
||||||
|
else:
|
||||||
p.arcount = 1
|
p.arcount = 1
|
||||||
p.additional = additional
|
p.additional = additional
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user