tests/krb5: Get encpart decryption key from kdc_exchange_dict
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 2 Sep 2021 21:55:10 +0000 (09:55 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Sep 2021 07:59:31 +0000 (07:59 +0000)
commit0e99382d73f44eed7e19e83e430938d587e762d0
treee61dfae6164e2639a06acb52b3db914570e51c4b
parenta5186f92803009c81eca2957e1bf2eb0ff7b6dff
tests/krb5: Get encpart decryption key from kdc_exchange_dict

Instead of using check_padata_fn to get the encpart decryption key, we
can get the key from the AS-REQ preauth phase or from the TGT, depending
on whether the message is an AS-REQ or a TGS-REQ. This allows removal of
check_padata_fn and some duplicated code.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/krb5/fast_tests.py
python/samba/tests/krb5/raw_testcase.py