git.samba.org
/
npower
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4946ab4
)
tests/krb5: Raise an error if root key data is the wrong length
author
Joseph Sutton
<josephsutton@catalyst.net.nz>
Wed, 20 Dec 2023 03:39:14 +0000
(16:39 +1300)
committer
Andrew Bartlett
<abartlet@samba.org>
Fri, 22 Dec 2023 05:33:31 +0000
(
05:33
+0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/gkdi.py
patch
|
blob
|
history
diff --git
a/python/samba/tests/gkdi.py
b/python/samba/tests/gkdi.py
index 53b49a315564c7393e88d4b0267ae6b9329a0215..623e0e5e092e62a288ddf5460b4cd45608666312 100644
(file)
--- a/
python/samba/tests/gkdi.py
+++ b/
python/samba/tests/gkdi.py
@@
-218,6
+218,13
@@
class GkdiBaseTest(TestCase):
self.assertIsNotNone(root_key_cn)
root_key_id = misc.GUID(root_key_cn)
+ data = root_key_object.get("msKds-RootKeyData", idx=0)
+ self.assertIsNotNone(data)
+ if len(data) != KEY_LEN_BYTES:
+ raise GetKeyError(
+ HRES_NTE_BAD_KEY, f"root key data must be {KEY_LEN_BYTES} bytes"
+ )
+
use_start_nt_time = NtTime(
int(root_key_object.get("msKds-UseStartTime", idx=0))
)