tests/krb5: Fix PK-INIT test framework to allow expired password keys
authorJo Sutton <josutton@catalyst.net.nz>
Thu, 21 Mar 2024 23:58:19 +0000 (12:58 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 28 Mar 2024 01:50:41 +0000 (01:50 +0000)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/raw_testcase.py
python/samba/tests/krb5/rfc4120_constants.py

index 5c9bdb0fd8e5ff05fcc39cc7d59665ecea3fd98d..7fe11387bac02fa6d595e24be058124b949931ee 100644 (file)
@@ -65,6 +65,7 @@ from samba.tests.krb5.rfc4120_constants import (
     FX_FAST_ARMOR_AP_REQUEST,
     KDC_ERR_CLIENT_REVOKED,
     KDC_ERR_GENERIC,
+    KDC_ERR_KEY_EXPIRED,
     KDC_ERR_POLICY,
     KDC_ERR_PREAUTH_FAILED,
     KDC_ERR_SKEW,
@@ -5058,6 +5059,8 @@ class RawKerberosTest(TestCase):
                 if ('1' in sent_pac_options
                         and error_code not in (0, KDC_ERR_GENERIC)):
                     expected_patypes += (PADATA_PAC_OPTIONS,)
+            elif error_code == KDC_ERR_KEY_EXPIRED:
+                expected_patypes += (PADATA_PK_AS_REP,)
             elif error_code != KDC_ERR_GENERIC:
                 if expect_etype_info:
                     expected_patypes += (PADATA_ETYPE_INFO,)
index dff6017b71057ffb1151042752f2ae939ebafede..b26126fc9f9dacdbd843e94a678c3c21cf34792a 100644 (file)
@@ -99,6 +99,7 @@ KDC_ERR_ETYPE_NOSUPP = 14
 KDC_ERR_SUMTYPE_NOSUPP = 15
 KDC_ERR_CLIENT_REVOKED = 18
 KDC_ERR_TGT_REVOKED = 20
+KDC_ERR_KEY_EXPIRED = 23
 KDC_ERR_PREAUTH_FAILED = 24
 KDC_ERR_PREAUTH_REQUIRED = 25
 KDC_ERR_SERVER_NOMATCH = 26