diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-08-01 13:04:16 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-08-01 15:40:17 +0000 |
commit | ff2f20439c403340ec886bf31f055355dfbfcdbf (patch) | |
tree | 67e624e43701d9b6a66b2c3a928a969210ad66c6 /python | |
parent | c226dc6e8a18343031829c35552e557903593daf (diff) | |
download | samba-ff2f20439c403340ec886bf31f055355dfbfcdbf.tar.gz |
tests/dcerpc/raw_protocol: split test_spnego_connect_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-x | python/samba/tests/dcerpc/raw_protocol.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/python/samba/tests/dcerpc/raw_protocol.py b/python/samba/tests/dcerpc/raw_protocol.py index e2c45603d39..a1ca66d0458 100755 --- a/python/samba/tests/dcerpc/raw_protocol.py +++ b/python/samba/tests/dcerpc/raw_protocol.py @@ -2611,7 +2611,7 @@ class TestDCERPC_BIND(RawDCERPCTest): self.assertIsNone(rep) self.assertNotConnected() - def test_spnego_connect_request(self): + def _test_spnego_connect_upgrade_request(self, upgrade_auth_level): ndr32 = base.transfer_syntax_ndr() tsf1_list = [ndr32] @@ -2730,9 +2730,9 @@ class TestDCERPC_BIND(RawDCERPCTest): self.assertEquals(rep.u.cancel_count, 0) self.assertGreaterEqual(len(rep.u.stub_and_verifier), rep.u.alloc_hint) - # Now a request with auth_info DCERPC_AUTH_LEVEL_INTEGRITY + # Now a request with auth_info upgrade_auth_level auth_info = self.generate_auth(auth_type=auth_type, - auth_level=dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY, + auth_level=upgrade_auth_level, auth_context_id=auth_context_id, auth_blob=b"\x01" + b"\x00" * 15) req = self.generate_request(call_id=4, @@ -2758,6 +2758,10 @@ class TestDCERPC_BIND(RawDCERPCTest): self.assertIsNone(rep) self.assertNotConnected() + def test_spnego_connect_integrity_upgrade(self): + return self._test_spnego_connect_upgrade_request( + dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY) + def test_spnego_integrity_request(self): ndr32 = base.transfer_syntax_ndr() |