summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJo Sutton <josutton@catalyst.net.nz>2024-03-22 12:58:19 +1300
committerAndrew Bartlett <abartlet@samba.org>2024-03-28 01:50:41 +0000
commit7cc8f455191faacf32efc474c27e99d45ef2e024 (patch)
tree94831c006c3dbc9714b9ca1cfee6cf9066bace40 /python
parent46263c5c202f6d409ad1b1d45ae523d9304f03d5 (diff)
downloadsamba-7cc8f455191faacf32efc474c27e99d45ef2e024.tar.gz
samba-7cc8f455191faacf32efc474c27e99d45ef2e024.tar.bz2
samba-7cc8f455191faacf32efc474c27e99d45ef2e024.zip
tests/krb5: Fix PK-INIT test framework to allow expired password keys
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/krb5/raw_testcase.py3
-rw-r--r--python/samba/tests/krb5/rfc4120_constants.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py
index 5c9bdb0fd8e..7fe11387bac 100644
--- a/python/samba/tests/krb5/raw_testcase.py
+++ b/python/samba/tests/krb5/raw_testcase.py
@@ -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,)
diff --git a/python/samba/tests/krb5/rfc4120_constants.py b/python/samba/tests/krb5/rfc4120_constants.py
index dff6017b710..b26126fc9f9 100644
--- a/python/samba/tests/krb5/rfc4120_constants.py
+++ b/python/samba/tests/krb5/rfc4120_constants.py
@@ -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