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: //proc/self/root/lib64/python3.9/site-packages/ldap/controls/__pycache__/sss.cpython-39.pyc
a

�.d��@s�dZddgZddlZddlZddlmZddlmZmZm	Z	m
Z
ddlmZm
Z
mZmZmZddlmZmZGd	d
�d
ej�ZGdd�dej�ZGd
d�de�ZGdd�dej�ZGdd�de�Zee	ej<dS)z{
ldap.controls.sss - classes for Server Side Sorting
(see RFC 2891)

See https://www.python-ldap.org/ for project details.
�SSSRequestControl�SSSResponseControl�N)�
LDAPObject)�RequestControl�ResponseControl�KNOWN_RESPONSE_CONTROLS�DecodeControlTuples)�univ�	namedtype�tag�namedval�
constraint)�encoder�decoderc
@sleZdZe�e�de���e�de��j	e
�e
je
j
d�d��e�de�d�j	e
�e
je
j
d�d���ZdS)	�SortKeyType�
attributeType�orderingRuler�ZimplicitTag�reverseOrderF�N)�__name__�
__module__�__qualname__r
�
NamedTypes�	NamedTyper	�OctetString�OptionalNamedType�subtyper�Tag�tagClassContext�tagFormatSimpleZDefaultedNamedTypeZBoolean�
componentType�r"r"�7/usr/lib64/python3.9/site-packages/ldap/controls/sss.pyrs����rc@seZdZe�ZdS)�SortKeyListTypeN)rrrrr!r"r"r"r#r$+sr$c@s.eZdZdZdZddd�Zdd�Zd	d
�ZdS)rzXOrder result server side

        >>> s = SSSRequestControl(ordering_rules=['-cn'])
    z1.2.840.113556.1.4.473FNcCsRt�||j|�||_t|t�r&|g}|D]"}|�d�}t|�dks*Jd��q*dS)N�:�z=syntax for ordering rule: [-]<attribute-type>[:ordering-rule])r�__init__�controlType�ordering_rules�
isinstance�str�split�len)�self�criticalityr)�ruler"r"r#r'6s

zSSSRequestControl.__init__cCs�t�}t|j�D]�\}}t�}|�d�}|r8|dd�}d|vrP|�d�\}}n
|d}}|�d|�|rv|�d|�|r�|�dd�|�||�q|S)N�-rr%rrr)r$�	enumerater)r�
startswithr,ZsetComponentByNameZsetComponentByPosition)r.�p�ir0�qZ
reverse_order�attribute_typeZ
ordering_ruler"r"r#�asn1Cs 

zSSSRequestControl.asn1cCst�|���S�N)r�encoder8)r.r"r"r#�encodeControlValueVsz$SSSRequestControl.encodeControlValue)FN)rrr�__doc__r(r'r8r;r"r"r"r#r/s�

c@s�eZdZe�e�de��je	�
dddddddd	d
dd�ejje�
d
dddddddddd�d��e�de��je�ejejd
�d���ZdS)�SortResultType�
sortResult)�successr)ZoperationsErrorr)ZtimeLimitExceededr&)ZstrongAuthRequired�)ZadminLimitExceeded�)ZnoSuchAttribute�)ZinappropriateMatching�)ZinsufficientAccessRights�2)Zbusy�3)ZunwillingToPerform�5)�other�Prrr&r@rArBrCrDrErFrH)ZnamedValues�subtypeSpecrrN)rrrr
rrr	Z
EnumeratedrrZNamedValuesrIr
ZSingleValueConstraintrrrrrr r!r"r"r"r#r=Zs2�
�����r=c@s"eZdZdZddd�Zdd�ZdS)	rz1.2.840.113556.1.4.474FcCst�||j|�dSr9)rr'r()r.r/r"r"r#r'uszSSSResponseControl.__init__cCshtj|t�d�\}}|r Jd��|�d�}t|�|_|�d�}|��rN||_nd|_|j|_|j|_	dS)N)Zasn1Speczall data could not be decodedr>r)
r�decoder=ZgetComponentByName�intr>ZhasValuer�resultZattribute_type_error)r.Zencodedr4�restZsort_resultr7r"r"r#�decodeControlValuexs


z%SSSResponseControl.decodeControlValueN)F)rrrr(r'rNr"r"r"r#rrs
)r<�__all__�sysZldapZldap.ldapobjectrZ
ldap.controlsrrrrZpyasn1.typer	r
rrr
Zpyasn1.codec.berrr�SequencerZ
SequenceOfr$rr=rr(r"r"r"r#�<module>s�	+