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__/__init__.cpython-39.pyc
a

�.d��@s�dZddlmZddlZejeks>Jede�dej�d����ddlZddlmZgd�ZiZ	Gd	d
�d
�Z
Gdd�d�ZGd
d�de
e�Zdd�Z
ddd�ZddlTddlTdS)z�
controls.py - support classes for LDAP controls

See https://www.python-ldap.org/ for details.

Description:
The ldap.controls module provides LDAPControl classes.
Each class provides support for a certain control.
�)�__version__Nzldap z and _ldap z version mismatch!)�PyAsn1Error)
�KNOWN_RESPONSE_CONTROLSZAssertionControlZBooleanControl�LDAPControlZManageDSAITControlZMatchedValuesControlZRelaxRulesControl�RequestControl�ResponseControlZSimplePagedResultsControlZValueLessRequestControl�RequestControlTuples�DecodeControlTuplesc@s"eZdZdZddd�Zdd�ZdS)	ra=
  Base class for all request controls

  controlType
      OID as string of the LDAPv3 extended request control
  criticality
      sets the criticality of the control (boolean)
  encodedControlValue
      control value of the LDAPv3 extended request control
      (here it is the BER-encoded ASN.1 control value)
  NFcCs||_||_||_dS�N)�controlType�criticality�encodedControlValue)�selfrrr
�r�</usr/lib64/python3.9/site-packages/ldap/controls/__init__.py�__init__9szRequestControl.__init__cCs|jS)z�
    sets class attribute encodedControlValue to the BER-encoded ASN.1
    control value composed by class attributes set before
    �r
)rrrr�encodeControlValue>sz!RequestControl.encodeControlValue)NFN)�__name__�
__module__�__qualname__�__doc__rrrrrrr,s
rc@s"eZdZdZddd�Zdd�ZdS)	rz�
  Base class for all response controls

  controlType
      OID as string of the LDAPv3 extended response control
  criticality
      sets the criticality of the received control (boolean)
  NFcCs||_||_dSr
)rr)rrrrrrrPszResponseControl.__init__cCs
||_dS)zc
    decodes the BER-encoded ASN.1 control value and sets the appropriate
    class attributes
    Nr)rr
rrr�decodeControlValueTsz"ResponseControl.decodeControlValue)NF)rrrrrrrrrrrFs	
rc@seZdZdZddd�ZdS)rzp
  Base class for combined request/response controls mainly
  for backward-compatibility to python-ldap 2.3.x
  NFcCs||_||_||_||_dSr
)rr�controlValuer
)rrrrr
rrrrbszLDAPControl.__init__)NFNN)rrrrrrrrrr\srcCs"|durdSdd�|D�}|SdS)z�
  Return list of readily encoded 3-tuples which can be directly
  passed to C module _ldap

  ldapControls
      sequence-type of RequestControl objects
  NcSsg|]}|j|j|��f�qSr)rrr)�.0�crrr�
<listcomp>ts�z(RequestControlTuples.<locals>.<listcomp>r)ZldapControls�resultrrrris�rc	Cs�|pt}g}|pgD]�\}}}z||�}Wn(tyT|rPt�dt|���Yq0|||_|_z|�|�Wnty�|r��Yq0|�	|�q|S)a�
  Returns list of readily decoded ResponseControl objects

  ldapControlTuples
      Sequence-type of 3-tuples returned by _ldap.result4() containing
      the encoded ASN.1 control values of response controls.
  knownLDAPControls
      Dictionary mapping extended control's OID to ResponseControl class
      of response controls known by the application. If None
      ldap.controls.KNOWN_RESPONSE_CONTROLS is used here.
  zAReceived unexpected critical response control with controlType %s)
r�KeyError�ldapZUNAVAILABLE_CRITICAL_EXTENSION�reprrrrr�append)ZldapControlTuplesZknownLDAPControlsrrrr
Zcontrolrrrr	{s r	)�*)N)rZldap.pkginforZ_ldap�ImportErrorrZpyasn1.errorr�__all__rrrrrr	Zldap.controls.simpleZldap.controls.libldaprrrr�<module>s 
�

!