From: Joseph Sutton Date: Mon, 6 Dec 2021 01:54:31 +0000 (+1300) Subject: tests/krb5: Allow PADATA-ENCRYPTED-CHALLENGE to be missing for skew errors X-Git-Tag: tdb-1.4.6~423 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=221569a14c8ecd529eae5c8c021cffe65324afec;p=thirdparty%2Fsamba.git tests/krb5: Allow PADATA-ENCRYPTED-CHALLENGE to be missing for skew errors A skew error means the client just tried using PADATA-ENC-TIMESTAMP or PADATA-ENCRYPTED-CHALLENGE, so it might not be necessary to announce them in that case. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Dec 7 08:32:42 UTC 2021 on sn-devel-184 --- diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py index 1c98dd5adab..cc004f04842 100644 --- a/python/samba/tests/krb5/raw_testcase.py +++ b/python/samba/tests/krb5/raw_testcase.py @@ -48,6 +48,7 @@ from samba.tests.krb5.rfc4120_constants import ( FX_FAST_ARMOR_AP_REQUEST, KDC_ERR_GENERIC, KDC_ERR_PREAUTH_FAILED, + KDC_ERR_SKEW, KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTIONS, KERB_ERR_TYPE_EXTENDED, KRB_AP_REQ, @@ -2940,7 +2941,7 @@ class RawKerberosTest(TestCaseInTempDir): if len(expect_etype_info2) != 0: expected_patypes += (PADATA_ETYPE_INFO2,) - if error_code != KDC_ERR_PREAUTH_FAILED: + if error_code not in (KDC_ERR_PREAUTH_FAILED, KDC_ERR_SKEW): if sent_fast: expected_patypes += (PADATA_ENCRYPTED_CHALLENGE,) else: