From: Stefan Metzmacher Date: Wed, 29 May 2024 14:41:12 +0000 (+0200) Subject: python:tests/dns_tkey: test TKEY with gss-tsig, gss.microsoft.com and invalid algorithms X-Git-Tag: samba-4.19.8~85 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e120078e2c3bea0435f8435e7b00ec8e31a0fbb6;p=thirdparty%2Fsamba.git python:tests/dns_tkey: test TKEY with gss-tsig, gss.microsoft.com and invalid algorithms BUG: https://bugzilla.samba.org/show_bug.cgi?id=13019 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from commit 740bda87a80b97816d892e8f7aae28759f6916ec) --- diff --git a/python/samba/tests/dns_tkey.py b/python/samba/tests/dns_tkey.py index 4c56722cfd7..6d6bbd4973d 100644 --- a/python/samba/tests/dns_tkey.py +++ b/python/samba/tests/dns_tkey.py @@ -55,11 +55,28 @@ class TestDNSUpdates(DNSTKeyTest): self.server_ip = server_ip super(TestDNSUpdates, self).setUp() - def test_tkey(self): - "test DNS TKEY handshake" + def test_tkey_gss_tsig(self): + "test DNS TKEY handshake with gss-tsig" self.tkey_trans() + def test_tkey_gss_microsoft_com(self): + "test DNS TKEY handshake with gss.microsoft.com" + + self.tkey_trans(algorithm_name="gss.microsoft.com") + + def test_tkey_invalid_gss_TSIG(self): + "test DNS TKEY handshake with invalid gss-TSIG" + + self.tkey_trans(algorithm_name="gss-TSIG", + expected_rcode=dns.DNS_RCODE_REFUSED) + + def test_tkey_invalid_gss_MICROSOFT_com(self): + "test DNS TKEY handshake with invalid gss.MICROSOFT.com" + + self.tkey_trans(algorithm_name="gss.MICROSOFT.com", + expected_rcode=dns.DNS_RCODE_REFUSED) + def test_update_wo_tsig(self): "test DNS update without TSIG record" diff --git a/selftest/knownfail.d/dns_tkey b/selftest/knownfail.d/dns_tkey index d2c8ff90183..fb0fca9ec58 100644 --- a/selftest/knownfail.d/dns_tkey +++ b/selftest/knownfail.d/dns_tkey @@ -1,2 +1,5 @@ ^samba.tests.dns_tkey.__main__.TestDNSUpdates.test_update_tsig_bad_keyname.fl2008r2dc ^samba.tests.dns_tkey.__main__.TestDNSUpdates.test_update_tsig_bad_mac.fl2008r2dc +^samba.tests.dns_tkey.__main__.TestDNSUpdates.test_tkey_gss_microsoft_com.fl2008r2dc +^samba.tests.dns_tkey.__main__.TestDNSUpdates.test_tkey_invalid_gss_MICROSOFT_com.fl2008r2dc +^samba.tests.dns_tkey.__main__.TestDNSUpdates.test_tkey_invalid_gss_TSIG.fl2008r2dc