public ModifyDNRequest() { this.entry = null; this.newrdn = null; this.deleteoldrdn = null; this.newSuperior = null; }
public ModifyRequest( LDAPDN object1, Asn1SequenceOf <ModifyRequest_modification_element> modification) { this.object1 = object1; this.modification = modification; }
public CompareRequest( LDAPDN entry, AttributeValueAssertion ava) { this.entry = entry; this.ava = ava; }
public AddRequest( LDAPDN entry, AttributeList attributes) { this.entry = entry; this.attributes = attributes; }
public ModifyResponse( LDAPResult_resultCode resultCode, LDAPDN matchedDN, LDAPString errorMessage, Referral referral) : base(resultCode, matchedDN, errorMessage, referral) { }
public ModifyRequest( LDAPDN object1, Asn1SequenceOf<ModifyRequest_modification_element> modification) { this.object1 = object1; this.modification = modification; }
public SearchResultEntry( LDAPDN objectName, PartialAttributeList attributes) { this.objectName = objectName; this.attributes = attributes; }
public override int BerDecode(IAsn1DecodingBuffer buffer, bool explicitTag = true) { int headLen = 0; Asn1Tag seqTag; headLen += TagBerDecode(buffer, out seqTag); int valueLen; headLen += LengthBerDecode(buffer, out valueLen); int valueLenDecode = 0; resultCode = new LDAPResult_resultCode(); valueLenDecode += resultCode.BerDecode(buffer); matchedDN = new LDAPDN(); valueLenDecode += matchedDN.BerDecode(buffer); errorMessage = new LDAPString(); valueLenDecode += errorMessage.BerDecode(buffer); if (valueLenDecode == valueLen) { referral = null; } else { Asn1Tag contextTag; valueLenDecode += TagBerDecode(buffer, out contextTag); referral = new Referral(); valueLenDecode += referral.BerDecodeWithoutUnisersalTag(buffer); } if (valueLen != valueLenDecode) { throw new Asn1DecodingUnexpectedData(ExceptionMessages.DecodingUnexpectedData + " LDAPResult."); } return(headLen + valueLen); }
public AddResponse( LDAPResult_resultCode resultCode, LDAPDN matchedDN, LDAPString errorMessage, Referral referral) : base(resultCode, matchedDN, errorMessage, referral) { }
public BindRequest( Asn1Integer version, LDAPDN name, AuthenticationChoice authentication) { this.version = version; this.name = name; this.authentication = authentication; }
public SearchResultDone( LDAPResult_resultCode resultCode, LDAPDN matchedDN, LDAPString errorMessage, Referral referral) { this.resultCode = resultCode; this.matchedDN = matchedDN; this.errorMessage = errorMessage; this.referral = referral; }
public ModifyDNRequest( LDAPDN entry, RelativeLDAPDN newrdn, Asn1Boolean deleteoldrdn, LDAPDN newSuperior) { this.entry = entry; this.newrdn = newrdn; this.deleteoldrdn = deleteoldrdn; this.newSuperior = newSuperior; }
public LDAPResult( LDAPResult_resultCode resultCode, LDAPDN matchedDN, LDAPString errorMessage, Referral referral) { this.resultCode = resultCode; this.matchedDN = matchedDN; this.errorMessage = errorMessage; this.referral = referral; }
public BindResponse( LDAPResult_resultCode resultCode, LDAPDN matchedDN, LDAPString errorMessage, Referral referral, Asn1OctetString serverSaslCreds) { this.resultCode = resultCode; this.matchedDN = matchedDN; this.errorMessage = errorMessage; this.referral = referral; this.serverSaslCreds = serverSaslCreds; }
public ExtendedResponse( LDAPResult_resultCode resultCode, LDAPDN matchedDN, LDAPString errorMessage, Referral referral) { this.resultCode = resultCode; this.matchedDN = matchedDN; this.errorMessage = errorMessage; this.referral = referral; this.responseName = null; this.response = null; }
public ExtendedResponse( LDAPResult_resultCode resultCode, LDAPDN matchedDN, LDAPString errorMessage, Referral referral, LDAPOID responseName, Asn1OctetString response) { this.resultCode = resultCode; this.matchedDN = matchedDN; this.errorMessage = errorMessage; this.referral = referral; this.responseName = responseName; this.response = response; }
public SearchRequest( LDAPDN baseObject, SearchRequest_scope scope, SearchRequest_derefAliases derefAliases, Asn1Integer sizeLimit, Asn1Integer timeLimit, Asn1Boolean typesOnly, Filter filter, AttributeDescriptionList attributes) { this.baseObject = baseObject; this.scope = scope; this.derefAliases = derefAliases; this.sizeLimit = sizeLimit; this.timeLimit = timeLimit; this.typesOnly = typesOnly; this.filter = filter; this.attributes = attributes; }
public override int BerDecode(IAsn1DecodingBuffer buffer, bool explicitTag = true) { int headLen = 0; Asn1Tag appTag; headLen += TagBerDecode(buffer, out appTag); int valueLen; headLen += LengthBerDecode(buffer, out valueLen); int valueLenDecode = 0; version = new Asn1Integer(); valueLenDecode += version.BerDecode(buffer); name = new LDAPDN(); valueLenDecode += name.BerDecode(buffer); authentication = new AuthenticationChoice(); valueLenDecode += authentication.BerDecode(buffer); if (valueLen != valueLenDecode) { throw new Asn1DecodingUnexpectedData(ExceptionMessages.DecodingUnexpectedData + " LDAPResult."); } return headLen + valueLen; }
/// <summary> /// Decodes the object by BER. /// </summary> /// <param name="buffer">A buffer that contains a BER encoding result.</param> /// <param name="explicitTag">Indicates whether the tags should be encoded explicitly. In our Test Suites, it will always be true.</param> /// <returns>The number of the bytes consumed in the buffer to decode this object.</returns> /// <exception cref="Asn1ConstraintsNotSatisfied"> /// Thrown when the constraints are not satisfied after decoding. /// </exception> /// <exception cref="Asn1DecodingUnexpectedData"> /// Thrown when the data in the buffer can not be properly decoded. /// </exception> /// <remarks>Override this method in a user-defined class only if the procedure is not applicable in some special scenarios.</remarks> public override int BerDecode(IAsn1DecodingBuffer buffer, bool explicitTag = true) { //Decode the top most tag and universal class tag int headLen = 0; Asn1Tag seqTag; headLen += TagBerDecode(buffer, out seqTag); int valueLen; headLen += LengthBerDecode(buffer, out valueLen); int valueLenDecode = 0; this.entry = new LDAPDN(); valueLenDecode += this.entry.BerDecode(buffer, true); this.newrdn = new RelativeLDAPDN(); valueLenDecode += this.newrdn.BerDecode(buffer, true); this.deleteoldrdn = new Asn1Boolean(); valueLenDecode += this.deleteoldrdn.BerDecode(buffer, true); if (valueLenDecode == valueLen) { newSuperior = null; } else { Asn1Tag contextTag; valueLenDecode += TagBerDecode(buffer, out contextTag); newSuperior = new LDAPDN(); valueLenDecode += newSuperior.BerDecodeWithoutUnisersalTag(buffer); } if (valueLen != valueLenDecode) { throw new Asn1DecodingUnexpectedData(ExceptionMessages.DecodingUnexpectedData + " ModifyDNRequest."); } return(headLen + valueLen); }
public override int BerDecode(IAsn1DecodingBuffer buffer, bool explicitTag = true) { int headLen = 0; Asn1Tag appTag; headLen += TagBerDecode(buffer, out appTag); int valueLen; headLen += LengthBerDecode(buffer, out valueLen); int valueLenDecode = 0; version = new Asn1Integer(); valueLenDecode += version.BerDecode(buffer); name = new LDAPDN(); valueLenDecode += name.BerDecode(buffer); authentication = new AuthenticationChoice(); valueLenDecode += authentication.BerDecode(buffer); if (valueLen != valueLenDecode) { throw new Asn1DecodingUnexpectedData(ExceptionMessages.DecodingUnexpectedData + " LDAPResult."); } return(headLen + valueLen); }
public override int BerDecode(IAsn1DecodingBuffer buffer, bool explicitTag = true) { int headLen = 0; Asn1Tag seqTag; headLen += TagBerDecode(buffer, out seqTag); int valueLen; headLen += LengthBerDecode(buffer, out valueLen); int valueLenDecode = 0; resultCode = new LDAPResult_resultCode(); valueLenDecode += resultCode.BerDecode(buffer); matchedDN = new LDAPDN(); valueLenDecode += matchedDN.BerDecode(buffer); errorMessage = new LDAPString(); valueLenDecode += errorMessage.BerDecode(buffer); if (valueLenDecode == valueLen) { referral = null; serverSaslCreds = null; } else { Asn1Tag contextTag; valueLenDecode += TagBerDecode(buffer, out contextTag); if (contextTag.TagValue == 3) { //referral referral = new Referral(); valueLenDecode += referral.BerDecodeWithoutUnisersalTag(buffer); if (valueLenDecode < valueLen) { valueLenDecode += TagBerDecode(buffer, out contextTag); } } if (contextTag.TagValue == 7) { //serverSaslCreds serverSaslCreds = new Asn1OctetString(); valueLenDecode += serverSaslCreds.BerDecodeWithoutUnisersalTag(buffer); } } if (valueLen != valueLenDecode) { throw new Asn1DecodingUnexpectedData(ExceptionMessages.DecodingUnexpectedData + " BindResponse."); } return headLen + valueLen; }
/// <summary> /// This constructor sets all elements to references to the /// given objects /// </summary> public TtlRefreshRequestValue(LDAPDN entryName_, Asn1Integer requestTtl_) { entryName = entryName_; requestTtl = requestTtl_; }
/// <summary> /// This constructor allows primitive data to be passed for all /// primitive elements. It will create new object wrappers for /// the primitive data and set other elements to references to /// the given objects /// </summary> public TtlRefreshRequestValue(byte[] entryName_, long requestTtl_) { entryName = new LDAPDN(entryName_); requestTtl = new Asn1Integer(requestTtl_); }
/// <summary> /// Decodes the object by BER. /// </summary> /// <param name="buffer">A buffer that contains a BER encoding result.</param> /// <param name="explicitTag">Indicates whether the tags should be encoded explicitly. In our Test Suites, it will always be true.</param> /// <returns>The number of the bytes consumed in the buffer to decode this object.</returns> /// <exception cref="Asn1ConstraintsNotSatisfied"> /// Thrown when the constraints are not satisfied after decoding. /// </exception> /// <exception cref="Asn1DecodingUnexpectedData"> /// Thrown when the data in the buffer can not be properly decoded. /// </exception> /// <remarks>Override this method in a user-defined class only if the procedure is not applicable in some special scenarios.</remarks> public override int BerDecode(IAsn1DecodingBuffer buffer, bool explicitTag = true) { int returnVal = 0, lengthAfterUniTag = 0, tagLength = 0; if (explicitTag) { //Decode the top most tag and universal class tag Asn1Tag topTag; returnVal += TagBerDecode(buffer, out topTag); } returnVal += LengthBerDecode(buffer, out lengthAfterUniTag); Asn1Tag valueTag; //Decode data valueTag = new Asn1Tag(Asn1TagType.Universal, 10) { EncodingWay = EncodingWay.Primitive }; if (IsTagMatch(buffer, valueTag, out tagLength)) { resultCode = new LDAPResult_resultCode(); returnVal += resultCode.BerDecode(buffer, true); } valueTag = new Asn1Tag(Asn1TagType.Universal, 4) { EncodingWay = EncodingWay.Primitive }; if (IsTagMatch(buffer, valueTag, out tagLength)) { matchedDN = new LDAPDN(); returnVal += matchedDN.BerDecode(buffer, true); } // decode errorMessage valueTag = new Asn1Tag(Asn1TagType.Universal, 4) { EncodingWay = EncodingWay.Primitive }; if (IsTagMatch(buffer, valueTag, out tagLength)) { errorMessage = new LDAPString(); returnVal += errorMessage.BerDecode(buffer, true); } // decode referral valueTag = new Asn1Tag(Asn1TagType.Context, 3) { EncodingWay = EncodingWay.Constructed }; if (IsTagMatch(buffer, valueTag, out tagLength)) { referral = new Referral(); returnVal += referral.BerDecode(buffer, false); } // decode responseName valueTag = new Asn1Tag(Asn1TagType.Context, 10) { EncodingWay = EncodingWay.Primitive }; if (IsTagMatch(buffer, valueTag, out tagLength, true)) { responseName = new LDAPOID(); returnVal += responseName.BerDecode(buffer, false); } // decode response valueTag = new Asn1Tag(Asn1TagType.Context, 11) { EncodingWay = EncodingWay.Primitive }; if (IsTagMatch(buffer, valueTag, out tagLength, true)) { response = new Asn1OctetString(); returnVal += response.BerDecode(buffer, false); } return(returnVal); }