Skip to content

No way to retrieve correct tagNumber for idBlock #87

@ayZagen

Description

@ayZagen

Hi there,

DISCLAIMER: I am no ASN1 expert so if this doesn't make sense, please feel free to close the issue.

I trying to decode following LDAP Message:

30 0c -- Begin the LDAPMessage sequence
   02 01 01 --  The message ID (integer value 1)
   60 07 -- Begin the bind request protocol op
      02 01 03 -- The LDAP protocol version (integer value 3)
      04 00 -- Empty bind DN (0-byte octet string)
      80 00 -- Empty password (0-byte octet string with type context-specific
            -- primitive zero)

I couldn't find any way to retrieve protocol number which is 0x60 (96 in decimal).

Here is a quick snippet (npm RunKit):

var asn1js = require("asn1js")

const { result } = asn1js.fromBER( new Uint8Array([ 48,12,2,1,1,96,7,2,1,3,4,0,128,0 ]) )

console.assert( result.valueBlock.value[1].idBlock.tagNumber === 96 )

IMHO, even it is an application specific tag, we should be able to retrieve it from decoded result. Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions