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

No way to retrieve correct tagNumber for idBlock #87

Open
ayZagen opened this issue Apr 18, 2024 · 0 comments
Open

No way to retrieve correct tagNumber for idBlock #87

ayZagen opened this issue Apr 18, 2024 · 0 comments

Comments

@ayZagen
Copy link

ayZagen commented Apr 18, 2024

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?

@ayZagen ayZagen changed the title No way to retrieve correct tagNumber No way to retrieve correct tagNumber for idBlock Apr 18, 2024
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

1 participant