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: //proc/self/root/lib64/python3.6/site-packages/ldap/controls/__pycache__/__init__.cpython-36.pyc
3

�`a��
@s�dZddlmZddlZejeks8tedeejf���ddlZddlmZdddd	d
ddd
dddddg
Z	iZ
Gdd
�d
�ZGdd�d�ZGdd	�d	ee�Z
dd�Zddd�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__Nz&ldap %s and _ldap %s 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)�selfr
rr�r� /usr/lib64/python3.6/__init__.py�__init__:szRequestControl.__init__cCs|jS)z�
    sets class attribute encodedControlValue to the BER-encoded ASN.1
    control value composed by class attributes set before
    )r)r
rrr�encodeControlValue?sz!RequestControl.encodeControlValue)NFN)�__name__�
__module__�__qualname__�__doc__rrrrrrr-s
c@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||_||_dS)N)r
r)r
r
rrrrrQszResponseControl.__init__cCs
||_dS)zc
    decodes the BER-encoded ASN.1 control value and sets the appropriate
    class attributes
    N)r)r
rrrr�decodeControlValueUsz"ResponseControl.decodeControlValue)NF)rrrrrrrrrrrGs
c@seZdZdZddd�ZdS)rzp
  Base class for combined request/response controls mainly
  for backward-compatibility to python-ldap 2.3.x
  NFcCs||_||_||_||_dS)N)r
r�controlValuer)r
r
rrrrrrrcszLDAPControl.__init__)NFNN)rrrrrrrrrr]scCs"|dkr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|j�f�qSr)r
rr)�.0�crrr�
<listcomp>vsz(RequestControlTuples.<locals>.<listcomp>r)ZldapControls�resultrrrrjs
cCs�|pt}g}x�|pgD]�\}}}y||�}Wn*tk
rX|rTtjdt|���YqX|||_|_y|j|�Wntk
r�|r��YqX|j	|�qW|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�reprr
rrr�append)ZldapControlTuplesZknownLDAPControlsrr
rrZcontrolrrrr	|s )�*)N)rZldap.pkginforZ_ldap�AssertionError�ImportErrorrZpyasn1.errorr�__all__rrrrrr	Zldap.controls.simpleZldap.controls.libldaprrrr�<module>
s6

!