summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2019-08-01 13:04:16 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-08-01 15:40:17 +0000
commite0e68ea25514fdb05921eabec6a4cdd587a9844e (patch)
tree260a125f7f697f4e1a3ac288322e389542d41c9a /python
parentff2f20439c403340ec886bf31f055355dfbfcdbf (diff)
downloadsamba-e0e68ea25514fdb05921eabec6a4cdd587a9844e.tar.gz
tests/dcerpc/raw_protocol: split test_spnego_integrity_request into 2 parts
This can be a generic test that can be used for more auth_levels. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'python')
-rwxr-xr-xpython/samba/tests/dcerpc/raw_protocol.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/samba/tests/dcerpc/raw_protocol.py b/python/samba/tests/dcerpc/raw_protocol.py
index a1ca66d0458..f287d71c8c6 100755
--- a/python/samba/tests/dcerpc/raw_protocol.py
+++ b/python/samba/tests/dcerpc/raw_protocol.py
@@ -2762,7 +2762,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
return self._test_spnego_connect_upgrade_request(
dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY)
- def test_spnego_integrity_request(self):
+ def _test_spnego_connect_downgrade_request(self, initial_auth_level):
ndr32 = base.transfer_syntax_ndr()
tsf1_list = [ndr32]
@@ -2778,7 +2778,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
g.set_credentials(c)
g.want_feature(gensec.FEATURE_DCE_STYLE)
auth_type = dcerpc.DCERPC_AUTH_TYPE_SPNEGO
- auth_level = dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY
+ auth_level = initial_auth_level
auth_context_id = 2
g.start_mech_by_authtype(auth_type, auth_level)
from_server = b""
@@ -2875,6 +2875,10 @@ class TestDCERPC_BIND(RawDCERPCTest):
self.assertIsNone(rep)
self.assertNotConnected()
+ def test_spnego_integrity_downgrade_connect(self):
+ return self._test_spnego_connect_upgrade_request(
+ dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY)
+
def test_spnego_unfinished_request(self):
ndr32 = base.transfer_syntax_ndr()