Exemple #1
0
 def __str__(self):
     return str(BERSequence([
         BEROctetString(self.baseObject),
         BEREnumerated(self.scope),
         BEREnumerated(self.derefAliases),
         BERInteger(self.sizeLimit),
         BERInteger(self.timeLimit),
         BERBoolean(self.typesOnly),
         self.filter,
         BERSequenceOf(map(BEROctetString, self.attributes)),
         ], tag=self.tag))
Exemple #2
0
 def __str__(self):
     return str(
         BERSequence([
             BERInteger(self.version),
             BEROctetString(self.dn),
             BEROctetString(self.auth, tag=CLASS_CONTEXT | 0),
         ],
                     tag=self.tag))
Exemple #3
0
 def __str__(self):
     if not self.sasl:
         auth_ber = BEROctetString(self.auth, tag=CLASS_CONTEXT|0)
     else:
         auth_ber = BERSequence([BEROctetString(self.auth[0]), BEROctetString(self.auth[1])], tag=CLASS_CONTEXT|3)
     return str(BERSequence([
         BERInteger(self.version),
         BEROctetString(self.dn),
         auth_ber,
         ], tag=self.tag))
Exemple #4
0
 def __str__(self):
     l = [BERInteger(self.id), self.value]
     if self.controls is not None:
         l.append(LDAPControls([LDAPControl(*a) for a in self.controls]))
     return str(BERSequence(l))