]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Allow PADATA-ENCRYPTED-CHALLENGE to be missing for skew errors
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 6 Dec 2021 01:54:31 +0000 (14:54 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 7 Dec 2021 08:32:42 +0000 (08:32 +0000)
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 <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Dec  7 08:32:42 UTC 2021 on sn-devel-184

python/samba/tests/krb5/raw_testcase.py

index 1c98dd5adab035745942466121a0c7cea1239412..cc004f0484248d49552ffd8202f2baeb19a8faa9 100644 (file)
@@ -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: