class CheckSum(Sequence): componentType = NamedTypes(NamedType('cksumtype', _c(0, Integer())), NamedType('checksum', _c(1, OctetString())))
class EddsaPublicKey(univ.Sequence): componentType = NamedTypes(NamedType('Type', Identifier()), NamedType('PublicKey', univ.BitString()))
class LDAPResult(Sequence): """ LDAPResult ::= SEQUENCE { resultCode ENUMERATED { success (0), operationsError (1), protocolError (2), timeLimitExceeded (3), sizeLimitExceeded (4), compareFalse (5), compareTrue (6), authMethodNotSupported (7), strongerAuthRequired (8), -- 9 reserved -- referral (10), adminLimitExceeded (11), unavailableCriticalExtension (12), confidentialityRequired (13), saslBindInProgress (14), noSuchAttribute (16), undefinedAttributeType (17), inappropriateMatching (18), constraintViolation (19), attributeOrValueExists (20), invalidAttributeSyntax (21), -- 22-31 unused -- noSuchObject (32), aliasProblem (33), invalidDNSyntax (34), -- 35 reserved for undefined isLeaf -- aliasDereferencingProblem (36), -- 37-47 unused -- inappropriateAuthentication (48), invalidCredentials (49), insufficientAccessRights (50), busy (51), unavailable (52), unwillingToPerform (53), loopDetect (54), -- 55-63 unused -- namingViolation (64), objectClassViolation (65), notAllowedOnNonLeaf (66), notAllowedOnRDN (67), entryAlreadyExists (68), objectClassModsProhibited (69), -- 70 reserved for CLDAP -- affectsMultipleDSAs (71), -- 72-79 unused -- other (80), ... }, matchedDN LDAPDN, diagnosticMessage LDAPString, referral [3] Referral OPTIONAL } """ componentType = NamedTypes( NamedType('resultCode', ResultCode()), NamedType('matchedDN', LDAPDN()), NamedType('diagnosticMessage', LDAPString()), OptionalNamedType('referral', Referral()), )
class PreimageFulfillment(Sequence): componentType = NamedTypes( NamedType( 'preimage', OctetString().subtype( implicitTag=Tag(tagClassContext, tagFormatSimple, 0))), )
class Identifier(univ.Sequence): componentType = NamedTypes(NamedType('type', univ.ObjectIdentifier()))
class NmasSetUniversalPasswordRequestValue(Sequence): componentType = NamedTypes(NamedType('nmasver', NmasVer()), NamedType('reqdn', Identity()), NamedType('new_passwd', Password()))
class ReplicaInfoRequestValue(Sequence): tagSet = TagSet() componentType = NamedTypes(NamedType('server_dn', LDAPDN()), NamedType('partition_dn', LDAPDN()))
class KerbPaPacRequest(Sequence): componentType = NamedTypes(NamedType('include-pac', _c(0, Boolean())))
class PrincipalName(Sequence): componentType = NamedTypes( NamedType('name-type', _c(0, Integer())), NamedType('name-string', _c(1, SequenceOf(componentType=KerberosString()))))
class PaEncTsEnc(Sequence): componentType = NamedTypes(NamedType('patimestamp', _c(0, KerberosTime())), NamedType('pausec', _c(1, Microseconds())))
class TransitedEncoding(Sequence): componentType = NamedTypes(NamedType('tr-type', _c(0, Integer())), NamedType('contents', _c(1, OctetString())))
class LastReq(SequenceOf): componentType = Sequence( componentType=NamedTypes(NamedType('lr-type', _c(0, Integer())), NamedType('lr-value', _c(1, KerberosTime()))))
class KdcReq(Sequence): componentType = NamedTypes( NamedType('pvno', _c(1, Integer())), NamedType('msg-type', _c(2, Integer())), NamedType('padata', _c(3, SequenceOf(componentType=PAData()))), NamedType('req-body', _c(4, KdcReqBody())))
class Ticket(Sequence): tagSet = application(1) componentType = NamedTypes(NamedType('tkt-vno', _c(0, Integer())), NamedType('realm', _c(1, Realm())), NamedType('sname', _c(2, PrincipalName())), NamedType('enc-part', _c(3, EncryptedData())))
class GroupingControlValue(Sequence): componentType = NamedTypes(NamedType('groupingCookie', GroupCookie()), OptionalNamedType('groupValue', OctetString()))
class HostAddress(Sequence): componentType = NamedTypes(NamedType('addr-type', _c(0, Integer())), NamedType('address', _c(1, OctetString())))
class NmasGetUniversalPasswordResponseValue(Sequence): componentType = NamedTypes(NamedType('nmasver', NmasVer()), NamedType('err', Error()), OptionalNamedType('passwd', Password()))
class AuthorizationData(SequenceOf): componentType = Sequence( componentType=NamedTypes(NamedType('ad-type', _c(0, Integer())), NamedType('ad-data', _c(1, OctetString()))))
class NmasSetUniversalPasswordResponseValue(Sequence): componentType = NamedTypes(NamedType('nmasver', NmasVer()), NamedType('err', Error()))
class PAData(Sequence): componentType = NamedTypes(NamedType('padata-type', _c(1, Integer())), NamedType('padata-value', _c(2, OctetString())))
from .condition import Condition class Ed25519Sha512Fulfillment(Sequence): # TODO implement def __deepcopy__(self, memo): return None Ed25519Sha512Fulfillment.componentType = NamedTypes( NamedType( 'publicKey', OctetString().subtype(subtypeSpec=ValueSizeConstraint(32, 32)).subtype( implicitTag=Tag(tagClassContext, tagFormatSimple, 0)), ), NamedType( 'signature', OctetString().subtype(subtypeSpec=ValueSizeConstraint(64, 64)).subtype( implicitTag=Tag(tagClassContext, tagFormatSimple, 1)), ), ) class RsaSha256Fulfillment(Sequence): pass RsaSha256Fulfillment.componentType = NamedTypes( NamedType( 'modulus', OctetString().subtype(
class CreateGroupTypeRequestValue(Sequence): componentType = NamedTypes( NamedType('createGroupType', LDAPOID()), OptionalNamedType('createGroupValue', OctetString()))
class DERSignature(Sequence): componentType = NamedTypes( NamedType("r", Integer()), NamedType("s", Integer()), )
class CreateGroupTypeResponseValue(Sequence): componentType = NamedTypes( NamedType('createGroupCookie', GroupCookie()), OptionalNamedType('createGroupValue', OctetString()))
class EddsaPrivateKey(univ.Sequence): componentType = NamedTypes( NamedType('Version', univ.Integer()), NamedType('Type', Identifier()), NamedType('PrivateKey', univ.OctetString()), )
class EndGroupTypeRequestValue(Sequence): componentType = NamedTypes( NamedType('endGroupCookie', GroupCookie()), OptionalNamedType('endGroupValue', OctetString()))
NamedType('not', Not()), NamedType('equalityMatch', EqualityMatch()), NamedType('substrings', SubstringFilter()), NamedType('greaterOrEqual', GreaterOrEqual()), NamedType('lessOrEqual', LessOrEqual()), NamedType('present', Present()), NamedType('approxMatch', ApproxMatch()), NamedType('extensibleMatch', MatchingRuleAssertion()), ) # Similar trick to what we did with DRSUAPI (pNextEntInf). Trying to cheat Python, using Filter() now with And(), # Or() and Not() now that is defined And.componentType = Filter() Or.componentType = Filter() Not.componentType = NamedTypes(NamedType('notFilter', Filter())) Not.tagSet = Filter.tagSet.tagExplicitly( Tag(tagClassContext, tagFormatConstructed, 2)) class Selector(LDAPString): pass class AttributeSelection(SequenceOf): """ AttributeSelection ::= SEQUENCE OF selector LDAPString -- The LDAPString is constrained to -- <attributeSelector> in Section 4.5.1.8 """ componentType = Selector()
class EndGroupTypeResponseValue(Sequence): componentType = NamedTypes( OptionalNamedType('endGroupValue', OctetString()))
class EncryptedData(Sequence): componentType = NamedTypes(NamedType('etype', _c(0, Integer())), OptionalNamedType('kvno', _c(1, Integer())), NamedType('cipher', _c(2, OctetString())))
class EncryptionKey(Sequence): componentType = NamedTypes(NamedType('keytype', _c(0, Integer())), NamedType('keyvalue', _c(1, OctetString())))