diff options
author | Isaac Boukris <iboukris@gmail.com> | 2020-05-07 01:25:36 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2020-06-12 20:42:38 +0000 |
commit | a823cc1e8bc9a68a7e662022705039397a5df7e1 (patch) | |
tree | 8e0a4552a0242bcf7a86acd3927ba77ec24efa97 /python | |
parent | 8fdff19c5461315556014d25d237a958edeed1a2 (diff) | |
download | samba-a823cc1e8bc9a68a7e662022705039397a5df7e1.tar.gz |
selftest: allow EncASRepPart to be encoded as EncTGSRepPart
that's how MIT kdc encodes it, clients accept both.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14233
Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rwxr-xr-x | python/samba/tests/krb5/simple_tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/samba/tests/krb5/simple_tests.py b/python/samba/tests/krb5/simple_tests.py index c9998c4d2db..236fbda1cd5 100755 --- a/python/samba/tests/krb5/simple_tests.py +++ b/python/samba/tests/krb5/simple_tests.py @@ -115,7 +115,12 @@ class SimpleKerberosTests(RawKerberosTest): usage = 3 enc_part2 = key.decrypt(usage, rep['enc-part']['cipher']) - enc_part2 = self.der_decode(enc_part2, asn1Spec=krb5_asn1.EncASRepPart()) + + # MIT KDC encodes both EncASRepPart and EncTGSRepPart with application tag 26 + try: + enc_part2 = self.der_decode(enc_part2, asn1Spec=krb5_asn1.EncASRepPart()) + except Exception: + enc_part2 = self.der_decode(enc_part2, asn1Spec=krb5_asn1.EncTGSRepPart()) # TGS Request service_creds = self.get_service_creds(allow_missing_password=True) |