summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2021-07-27 16:31:39 +1200
committerJule Anger <janger@samba.org>2021-09-16 06:50:12 +0000
commit7cb152b6ba63188034dda6a42e4e4419e834c0c8 (patch)
treedf0c8a30d35b560551f9bc1c5ab5c1dfe3eb86f4
parente1f72aaaa44c9d106f3abc436c91f146186030db (diff)
downloadsamba-7cb152b6ba63188034dda6a42e4e4419e834c0c8.tar.gz
tests/krb5: Check reply FAST padata if request included FAST
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14817 (cherry picked from commit 056fb71832e7aa16132c58ff393ab8b752ef6a93)
-rw-r--r--python/samba/tests/krb5/raw_testcase.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py
index 77b682e57ea..965a8f9fb00 100644
--- a/python/samba/tests/krb5/raw_testcase.py
+++ b/python/samba/tests/krb5/raw_testcase.py
@@ -2177,6 +2177,21 @@ class RawKerberosTest(TestCaseInTempDir):
rep_padata = self.der_decode(edata,
asn1Spec=krb5_asn1.METHOD_DATA())
self.assertGreater(len(rep_padata), 0)
+
+ if sent_fast:
+ self.assertEqual(1, len(rep_padata))
+ rep_pa_dict = self.get_pa_dict(rep_padata)
+ self.assertIn(PADATA_FX_FAST, rep_pa_dict)
+
+ armor_key = kdc_exchange_dict['armor_key']
+ self.assertIsNotNone(armor_key)
+ fast_response = self.check_fx_fast_data(
+ kdc_exchange_dict,
+ rep_pa_dict[PADATA_FX_FAST],
+ armor_key,
+ expect_strengthen_key=False)
+
+ rep_padata = fast_response['padata']
else:
rep_padata = []