Conrad,

Thanks for your help. This Definition is for a LDAP application, 
specifically a Control to be sent to a LDAPServer for Server Side Sorting of 
Search results.

The rules for the Sequence are :
"The SortKeyList sequence is in order of highest to lowest sort key   
precedence.

The MatchingRuleId, as defined in section 4.1.9 of [LDAPv3], SHOULD be one 
that is valid for the attribute type it applies to.  If it is not, the 
server will return inappropriateMatching.

Each attributeType should only occur in the SortKeyList once. If an 
attributeType is included in the sort key list multiple times, the server 
should return an error in the sortResult of unwillingToPerform.

If the orderingRule is omitted, the ordering MatchingRule defined for use 
with this attribute MUST be used.

Any conformant implementation of this control MUST allow a sort key list 
with at least one key. "

The Matching Rule is :

"An X.501(1993) Matching Rule is identified in the LDAP protocol by the 
printable representation of its OBJECT IDENTIFIER, either as one of the 
strings given in [5], or as decimal digits with components separated by 
periods, e.g. "caseIgnoreIA5Match" or "1.3.6.1.4.1.453.33.33".
   MatchingRuleId ::= LDAPString"

LDAPString is defined as - LDAPString ::= OCTET STRING.

I am encoding the orderingRule and reverseOrder as context-specific and 
Primitive - is this correct ? I am unable to figure out where the extra '{' 
is coming from (- according to someone who is testing the code :) ). I am 
able to get the Octets, but am not able to get a ASN description to see if I 
AM getting the extra brace. Is there a way to do this ?

Thanks again, and sorry for the long winded post,
~Prabu

>On Tue, 17 Apr 2001, Prabu Ramiah wrote:
> > SortKeyList ::= SEQUENCE OF SEQUENCE {
> >                   attributeType   AttributeDescription,
> >                   orderingRule    [0] MatchingRuleId OPTIONAL,
> >                   reverseOrder    [1] BOOLEAN DEFAULT FALSE }
> >
> > where AttributeDescription and MatchingRuleId are OctetStrings.
>
>You didn't let us know what MatchingRuleId is supposed to be.
>
> > I understand that the orderingRule and reverseOrder should be encoded
> > 0x80 andd 0x81 as they are primitive types. In the ASN.1 description, 
>should
> > there be a "{" before the orderingRule, on account of being a
> > context-specific type ?
>
>No, a { cannot be used before the orderingRule.
>
> > Also is there a way to see the ASN.1 description from the octets 
>generated
> > (example : 30 10 30 ......) ?
>
>One could try to guess, but you'd have to provide more of the PDU.
>
>
>
>=====================================================================
>Conrad Sigona                         Toll Free      : 1-888-OSS-ASN1
>OSS Nokalva                           Voice Mail     : 1-732-302-9669 x400
>[EMAIL PROTECTED]                        Fax            : 1-419-831-5035
>http://www.oss.com                    My direct line : 1-315-845-1773
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to