mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
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>
This commit is contained in:
parent
ff2f20439c
commit
e0e68ea255
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user