Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read sequences tagged with tags other than sequence #6

Open
mbr opened this issue Feb 12, 2017 · 1 comment
Open

Cannot read sequences tagged with tags other than sequence #6

mbr opened this issue Feb 12, 2017 · 1 comment

Comments

@mbr
Copy link

mbr commented Feb 12, 2017

When parsing an LDAP query, the following structure must be parsed:

SearchRequest ::= [APPLICATION 3] SEQUENCE {
             baseObject      LDAPDN,
             scope           ENUMERATED {
                  baseObject              (0),
                  singleLevel             (1),
                  wholeSubtree            (2),
                  ...  },
             derefAliases    ENUMERATED {
                  neverDerefAliases       (0),
                  derefInSearching        (1),
                  derefFindingBaseObj     (2),
                  derefAlways             (3) },
             sizeLimit       INTEGER (0 ..  maxInt),
             timeLimit       INTEGER (0 ..  maxInt),
             typesOnly       BOOLEAN,
             filter          Filter,
             attributes      AttributeSelection }

However, the only way to parse a sequence of multiple primitives is by calling read_sequence, which assumes a tag of SEQUENCE.

To read the Tag::application(3) one must employ read_tagged with the correct tag, which will result in a BERReader - but we really want a BERReaderSeq here.

@qnighy
Copy link
Owner

qnighy commented Feb 13, 2017

Do you mean implicit tags? If I remember correctly, you can just do read_sequence inside read_tagged_implicit. Then it doesn't expect SEQUENCE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants