HEX
Server: LiteSpeed
System: Linux shams.tasjeel.ae 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: infowars (1469)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //lib64/python3.9/site-packages/ldap/controls/__pycache__/deref.cpython-39.opt-1.pyc
a

�.d�
�@sdZddgZddlZddlmZmZddlZddlm	Z	m
Z
mZddlm
Z
mZddlmZmZmZmZd	ZeZGd
d�de
j�ZGdd
�d
e
j�ZGdd�de
j�ZGdd�de
j�ZGdd�de
j�ZGdd�de
j�ZGdd�de
j�ZGdd�de�Zeeej <dS)z�
ldap.controls.deref - classes for
(see https://tools.ietf.org/html/draft-masarati-ldap-deref)

See https://www.python-ldap.org/ for project details.
�DEREF_CONTROL_OID�DereferenceControl�N)�LDAPControl�KNOWN_RESPONSE_CONTROLS)�	namedtype�univ�tag)�encoder�decoder)�LDAPDN�AttributeDescription�AttributeDescriptionList�AttributeValuez1.3.6.1.4.1.4203.666.5.16c@s,eZdZe�e�de��e�de���ZdS)�	DerefSpec�	derefAttr�
attributesN)	�__name__�
__module__�__qualname__r�
NamedTypes�	NamedTyper�
AttributeList�
componentType�rr�9/usr/lib64/python3.9/site-packages/ldap/controls/deref.pyrs���rc@seZdZe�ZdS)�
DerefSpecsN)rrrrrrrrrr+src@seZdZe�ZdS)�AttributeValuesN)rrrrrrrrrr2src@s,eZdZe�e�de��e�de���ZdS)�PartialAttribute�typeZvalsN)	rrrrrrrrrrrrrr6s�rc@s.eZdZe�Zejj�e	�
e	je	jd��ZdS)�PartialAttributeListrN)
rrrrrr�SequenceZtagSetZ
tagImplicitlyrZTagZtagClassContextZtagFormatConstructedrrrrr=s�rc@s8eZdZe�e�de��e�de��e�de	���Z
dS)�DerefResrZderefValZattrValsN)rrrrrrrrZOptionalNamedTyperrrrrrr!Ds
�r!c@seZdZe�ZdS)�DerefResultControlValueN)rrrr!rrrrrr"Lsr"c@s2eZdZeZddd�Zdd�Zdd�Zd	d
�ZdS)rFNcCst�||j|�|pi|_dS�N)r�__init__�controlType�
derefSpecs)�selfZcriticalityr&rrrr$SszDereferenceControl.__init__cCs�t�}d}|j��D]f\}}t�}t�}tt|��D]}|�|||�q4|�dt	|��|�d|�|�||�|d7}q|S)Nrrr�)
rr&�itemsrr�range�lenZsetComponentByPositionZsetComponentByNamer)r'Zderef_specs�i�
deref_attrZderef_attribute_namesZ
deref_specZderef_attributes�jrrr�_derefSpecsWs
zDereferenceControl._derefSpecscCst�|���Sr#)r	�encoder/)r'rrr�encodeControlValueesz%DereferenceControl.encodeControlValuec		Cs�tj|t�d�\}}i|_|D]~}|d|d|d}}}dd�|pJgD�}z |jt|��t|�|f�Wqty�t|�|fg|jt|�<Yq0qdS)N)Zasn1Specrr(�cSs(i|] }t|d�dd�|dD��qS)rcSsg|]}t|��qSr��str)�.0�vrrr�
<listcomp>n�zDDereferenceControl.decodeControlValue.<locals>.<dictcomp>.<listcomp>r(r3)r5Ztvrrr�
<dictcomp>ms�z9DereferenceControl.decodeControlValue.<locals>.<dictcomp>)r
�decoder"ZderefResr4�append�KeyError)	r'ZencodedControlValueZdecodedValue�_Z	deref_resr-Z	deref_valZ
deref_valsZpartial_attrs_dictrrr�decodeControlValuehs� z%DereferenceControl.decodeControlValue)FN)	rrrrr%r$r/r1r>rrrrrPs

)!�__doc__�__all__Z
ldap.controlsZldaprrZpyasn1_modules.rfc2251Zpyasn1_modulesZpyasn1.typerrrZpyasn1.codec.berr	r
rrr
rrrr rZ
SequenceOfrZSetOfrrrr!r"rr%rrrr�<module>s(�&