HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib64/python3.6/site-packages/ldap/controls/__pycache__/deref.cpython-36.pyc
3

�`a�
�@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,eZdZejejde��ejde���ZdS)�	DerefSpec�	derefAttr�
attributesN)	�__name__�
__module__�__qualname__r�
NamedTypes�	NamedTyper�
AttributeList�
componentType�rr�/usr/lib64/python3.6/deref.pyr src@seZdZe�ZdS)�
DerefSpecsN)rrrrrrrrrr,src@seZdZe�ZdS)�AttributeValuesN)rrrrrrrrrr3src@s,eZdZejejde��ejde���ZdS)�PartialAttribute�type�valsN)	rrrrrrrrrrrrrr7src@s.eZdZe�Zejjje	j
e	je	jd��ZdS)�PartialAttributeListrN)
rrrrrr�SequenceZtagSetZ
tagImplicitlyrZTagZtagClassContextZtagFormatConstructedrrrrr >sr c@s8eZdZejejde��ejde��ejde	���Z
dS)�DerefResrZderefValZattrValsN)rrrrrrrrZOptionalNamedTyper rrrrrr"Esr"c@seZdZe�ZdS)�DerefResultControlValueN)rrrr"rrrrrr#Msr#c@s2eZdZeZddd�Zdd�Zdd�Zd	d
�ZdS)rFNcCstj||j|�|pi|_dS)N)r�__init__�controlType�
derefSpecs)�selfZcriticalityr&rrrr$TszDereferenceControl.__init__cCs�t�}d}xx|jj�D]j\}}t�}t�}x$tt|��D]}|j|||�q8W|jdt	|��|jd|�|j||�|d7}qW|S)Nrrr�)
rr&�itemsrr�range�lenZsetComponentByPositionZsetComponentByNamer)r'Zderef_specs�i�
deref_attrZderef_attribute_namesZ
deref_specZderef_attributes�jrrr�_derefSpecsXszDereferenceControl._derefSpecscCstj|j��S)N)r	�encoder/)r'rrr�encodeControlValuefsz%DereferenceControl.encodeControlValuec	Cs�tj|t�d�\}}i|_x�|D]�}|d|d|d}}}dd�|pLgD�}y |jt|�jt|�|f�Wq tk
r�t|�|fg|jt|�<Yq Xq WdS)N)Zasn1Specrr(�cSs(i|] }dd�|dD�t|d��qS)cSsg|]}t|��qSr)�str)�.0�vrrr�
<listcomp>oszDDereferenceControl.decodeControlValue.<locals>.<dictcomp>.<listcomp>r(r)r3)r4Ztvrrr�
<dictcomp>nsz9DereferenceControl.decodeControlValue.<locals>.<dictcomp>)r
�decoder#ZderefResr3�append�KeyError)	r'ZencodedControlValueZdecodedValue�_Z	deref_resr-Z	deref_valZ
deref_valsZpartial_attrs_dictrrr�decodeControlValueis
 z%DereferenceControl.decodeControlValue)FN)	rrrrr%r$r/r1r<rrrrrQs

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