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.opt-1.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.473FNcCs>t�||j|�||_t|t�r&|g}|D]}|�d�}q*dS)N�:)r�__init__�controlType�ordering_rules�
isinstance�str�split)�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�ir.�qZ
reverse_order�attribute_typeZ
ordering_ruler"r"r#�asn1Cs 

zSSSRequestControl.asn1cCst�|���S�N)r�encoder6)r,r"r"r#�encodeControlValueVsz$SSSRequestControl.encodeControlValue)FN)rrr�__doc__r'r&r6r9r"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)ZtimeLimitExceeded�)ZstrongAuthRequired�)ZadminLimitExceeded�)ZnoSuchAttribute�)ZinappropriateMatching�)ZinsufficientAccessRights�2)Zbusy�3)ZunwillingToPerform�5)�other�Prrr>r?r@rArBrCrDrErG)ZnamedValues�subtypeSpecrrN)rrrr
rrr	Z
EnumeratedrrZNamedValuesrHr
ZSingleValueConstraintrrrrrr r!r"r"r"r#r;Zs2�
�����r;c@s"eZdZdZddd�Zdd�ZdS)	rz1.2.840.113556.1.4.474FcCst�||j|�dSr7)rr&r')r,r-r"r"r#r&uszSSSResponseControl.__init__cCs\tj|t�d�\}}|�d�}t|�|_|�d�}|��rB||_nd|_|j|_|j|_	dS)N)Zasn1Specr<r)
r�decoder;ZgetComponentByName�intr<ZhasValuer�resultZattribute_type_error)r,Zencodedr2�restZsort_resultr5r"r"r#�decodeControlValuexs


z%SSSResponseControl.decodeControlValueN)F)rrrr'r&rMr"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�	+