summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2020-11-10 11:20:03 +1300
committerAndrew Bartlett <abartlet@samba.org>2020-11-12 21:30:32 +0000
commit97b830cbcac53fcf49bbcd272812d1ba019bac51 (patch)
tree76f0626e7e8583c362b4c60468cd96df59af28b8 /python
parent532c941fbb8fc5fc5da4aa2d0e170229076e9aa7 (diff)
downloadsamba-97b830cbcac53fcf49bbcd272812d1ba019bac51.tar.gz
tests python krb5: Refactor canonicalization test constants
Modify tests to use the constants defined in rfc4120_constants.py Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rwxr-xr-xpython/samba/tests/krb5/as_canonicalization_tests.py30
1 files changed, 1 insertions, 29 deletions
diff --git a/python/samba/tests/krb5/as_canonicalization_tests.py b/python/samba/tests/krb5/as_canonicalization_tests.py
index caa186bed41..303788b672e 100755
--- a/python/samba/tests/krb5/as_canonicalization_tests.py
+++ b/python/samba/tests/krb5/as_canonicalization_tests.py
@@ -41,6 +41,7 @@ from samba.dsdb import (
UF_NORMAL_ACCOUNT)
from samba.samdb import SamDB
from samba.tests import delete_force, DynamicTestCase
+from samba.tests.krb5.rfc4120_constants import *
global_asn1_print = False
global_hexdump = False
@@ -123,35 +124,6 @@ class TestData:
MACHINE_NAME = "tstkrb5cnnmch"
USER_NAME = "tstkrb5cnnusr"
-# Encryption types
-AES256_CTS_HMAC_SHA1_96 = int(
- krb5_asn1.EncryptionTypeValues('kRB5-ENCTYPE-AES256-CTS-HMAC-SHA1-96'))
-AES128_CTS_HMAC_SHA1_96 = int(
- krb5_asn1.EncryptionTypeValues('kRB5-ENCTYPE-AES128-CTS-HMAC-SHA1-96'))
-ARCFOUR_HMAC_MD5 = int(
- krb5_asn1.EncryptionTypeValues('kRB5-ENCTYPE-ARCFOUR-HMAC-MD5'))
-
-# Message types
-KRB_ERROR = int(krb5_asn1.MessageTypeValues('krb-error'))
-KRB_AS_REP = int(krb5_asn1.MessageTypeValues('krb-as-rep'))
-
-# PAData types
-PADATA_ENC_TIMESTAMP = int(
- krb5_asn1.PADataTypeValues('kRB5-PADATA-ENC-TIMESTAMP'))
-PADATA_ETYPE_INFO2 = int(
- krb5_asn1.PADataTypeValues('kRB5-PADATA-ETYPE-INFO2'))
-
-# Error codes
-KDC_ERR_C_PRINCIPAL_UNKNOWN = 6
-KDC_ERR_PREAUTH_REQUIRED = 25
-
-# Name types
-NT_UNKNOWN = int(krb5_asn1.NameTypeValues('kRB5-NT-UNKNOWN'))
-NT_PRINCIPAL = int(krb5_asn1.NameTypeValues('kRB5-NT-PRINCIPAL'))
-NT_SRV_INST = int(krb5_asn1.NameTypeValues('kRB5-NT-SRV-INST'))
-NT_ENTERPRISE_PRINCIPAL = int(krb5_asn1.NameTypeValues('kRB5-NT-ENTERPRISE-PRINCIPAL'))
-
-
@DynamicTestCase
class KerberosASCanonicalizationTests(RawKerberosTest):