HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/samba/tests/krb5/__pycache__/salt_tests.cpython-310.pyc
o

eF�cg/�@s�ddlZddlZej�dd�dejd<ddlZddlmZddlm	m
mZdZdZ
Gdd�de�Zed	krHdZdZ
ddlZe��dSdS)
�Nz
bin/python�1�PYTHONUNBUFFERED)�
AsReqBaseTestFcszeZdZ�fdd�Zdd�dd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Zd=d>�Z d?d@�Z!dAdB�Z"dCdD�Z#dEdF�Z$dGdH�Z%dIdJ�Z&dKdL�Z'dMdN�Z(dOdP�Z)dQdR�Z*dSdT�Z+dUdV�Z,dWdX�Z-dYdZ�Z.�Z/S)[�	SaltTestscst���t|_t|_dS)N)�super�setUp�global_asn1_print�
do_asn1_print�global_hexdump�
do_hexdump)�self��	__class__��=/usr/lib/python3/dist-packages/samba/tests/krb5/salt_tests.pyr$s

zSaltTests.setUpN)�optscCs0z|j||d�WStjy|��YdSw)N��account_typer)�get_cached_creds�ldb�LdbError�fail)rrrrrr�
_get_creds)s��zSaltTests._get_credscCsN|�|�}|�|�|�|�}|�|ddtjj�|�|dd|�dS)Nr�etype�salt)�get_salt�assertIsNotNone�_run_as_req_enc_timestamp�assertEqual�kcrypto�Enctype�AES256)r�client_creds�
expected_salt�etype_info2rrr�_run_salt_test3s



zSaltTests._run_salt_testcC�$|j|jjddid�}|�|�dS�N�name_suffixzfoo@barr�r�AccountType�USERr�rr"rrr�test_salt_at_user<�
�zSaltTests.test_salt_at_usercCr&r'�rr*�COMPUTERrr,rrr�test_salt_at_macBr.zSaltTests.test_salt_at_maccCr&�Nr(zFoo@barrr)r,rrr�test_salt_at_case_userHr.z SaltTests.test_salt_at_case_usercCr&r2r/r,rrr�test_salt_at_case_macNr.zSaltTests.test_salt_at_case_maccCr&�Nr(zfoo@@barrr)r,rrr�test_salt_double_at_userTr.z"SaltTests.test_salt_double_at_usercCr&r5r/r,rrr�test_salt_double_at_macZr.z!SaltTests.test_salt_double_at_maccCr&�N�name_prefixz@foorr)r,rrr�test_salt_at_start_user`r.z!SaltTests.test_salt_at_start_usercCr&r8r/r,rrr�test_salt_at_start_macfr.z SaltTests.test_salt_at_start_maccCr&�Nr(�foo@rr)r,rrr�test_salt_at_end_userlr.zSaltTests.test_salt_at_end_usercCr&r<r/r,rrr�test_salt_at_end_macrr.zSaltTests.test_salt_at_end_maccC�&|j|jjddd�d�}|�|�dS)Nr=F�r(�
add_dollarrr/r,rrr�test_salt_at_end_no_dollar_macx���z(SaltTests.test_salt_at_end_no_dollar_maccCr&)NrBFrr/r,rrr�test_salt_no_dollar_macr.z!SaltTests.test_salt_no_dollar_maccCr@)N�foo$barFrArr/r,rrr�test_salt_dollar_mid_mac�rDz"SaltTests.test_salt_dollar_mid_maccCr&�Nr(rFrr)r,rrr�test_salt_dollar_user�r.zSaltTests.test_salt_dollar_usercCr&rHr/r,rrr�test_salt_dollar_mac�r.zSaltTests.test_salt_dollar_maccCr&�Nr(zfoo$rr)r,rrr�test_salt_dollar_end_user�r.z#SaltTests.test_salt_dollar_end_usercCr&rKr/r,rrr�test_salt_dollar_end_mac�r.z"SaltTests.test_salt_dollar_end_maccCr&)N�upn�foo0rr)r,rrr�test_salt_upn_user�r.zSaltTests.test_salt_upn_usercCr&)NrN�foo1rr/r,rrr�test_salt_upn_mac�r.zSaltTests.test_salt_upn_maccCr&)NrNz	host/foo2rr)r,rrr�test_salt_upn_host_user�r.z!SaltTests.test_salt_upn_host_usercCr&)NrNz	host/foo3rr/r,rrr�test_salt_upn_host_mac�r.z SaltTests.test_salt_upn_host_maccC�4|����}|j|jjdd|id�}|�|�dS)NrNzfoo4@r��	get_samdb�domain_dns_namerr*r+r�r�realmr"rrr�test_salt_upn_realm_user��
�z"SaltTests.test_salt_upn_realm_usercCrU)NrNzfoo5@r�rWrXrr*r0rrYrrr�test_salt_upn_realm_mac�r\z!SaltTests.test_salt_upn_realm_maccCrU)NrNz
host/foo6@rrVrYrrr�test_salt_upn_host_realm_user�r\z'SaltTests.test_salt_upn_host_realm_usercCrU)NrNz
host/foo7@rr]rYrrr�test_salt_upn_host_realm_mac�r\z&SaltTests.test_salt_upn_host_realm_maccCrU)NrNzfoo8$@rrVrYrrr�test_salt_upn_dollar_realm_user�r\z)SaltTests.test_salt_upn_dollar_realm_usercCrU)NrNzfoo9$@rr]rYrrr�test_salt_upn_dollar_realm_mac�r\z(SaltTests.test_salt_upn_dollar_realm_maccCrU)NrNzhost/foo10$@rrVrYrrr�$test_salt_upn_host_dollar_realm_user�r\z.SaltTests.test_salt_upn_host_dollar_realm_usercCrU)NrNzhost/foo11$@rr]rYrrr�#test_salt_upn_host_dollar_realm_mac�r\z-SaltTests.test_salt_upn_host_dollar_realm_maccCr&)NrNzfoo12@other.realmrr)r,rrr�test_salt_upn_other_realm_user�r.z(SaltTests.test_salt_upn_other_realm_usercCr&)NrNzfoo13@other.realmrr/r,rrr�test_salt_upn_other_realm_mac�r.z'SaltTests.test_salt_upn_other_realm_maccCr&)NrNzhost/foo14@other.realmrr)r,rrr�#test_salt_upn_host_other_realm_userr.z-SaltTests.test_salt_upn_host_other_realm_usercCr&)NrNzhost/foo15@other.realmrr/r,rrr�"test_salt_upn_host_other_realm_macr.z,SaltTests.test_salt_upn_host_other_realm_maccCr&)NrN�Foo16rr)r,rrr�test_salt_upn_case_userr.z!SaltTests.test_salt_upn_case_usercCr&)NrN�Foo17rr/r,rrr�test_salt_upn_case_macr.z SaltTests.test_salt_upn_case_maccCrU)NrNzfoo$18@rrVrYrrr�#test_salt_upn_dollar_mid_realm_userr\z-SaltTests.test_salt_upn_dollar_mid_realm_usercCrU)NrNzfoo$19@rr]rYrrr�"test_salt_upn_dollar_mid_realm_macr\z,SaltTests.test_salt_upn_dollar_mid_realm_maccCrU)NrNzhost/foo$20@rrVrYrrr�(test_salt_upn_host_dollar_mid_realm_user&r\z2SaltTests.test_salt_upn_host_dollar_mid_realm_usercCrU)NrNzhost/foo$21@rr]rYrrr�'test_salt_upn_host_dollar_mid_realm_mac-r\z1SaltTests.test_salt_upn_host_dollar_mid_realm_maccCrU)NrNz
foo22@bar@rrVrYrrr�test_salt_upn_at_realm_user4r\z%SaltTests.test_salt_upn_at_realm_usercCrU)NrNz
foo23@bar@rr]rYrrr�test_salt_upn_at_realm_mac;r\z$SaltTests.test_salt_upn_at_realm_mac)0�__name__�
__module__�__qualname__rrr%r-r1r3r4r6r7r:r;r>r?rCrErGrIrJrLrMrPrRrSrTr[r^r_r`rarbrcrdrerfrgrhrjrlrmrnrorprqrr�
__classcell__rrr
rr"s\�
	r�__main__)�sys�os�path�insert�environr�samba.tests.krb5.as_req_testsr�samba.tests.krb5.kcrypto�tests�krb5rrr
rrs�unittest�mainrrrr�<module>s$
#�