【问题标题】:LDAP message structureLDAP 消息结构
【发布时间】:2018-08-15 16:47:46
【问题描述】:

我正在尝试了解 LDAP 消息结构,尤其是 searchResEntry 类型,以便进行一些解析。使用 Wireshark 作为指导,我有一个大致的了解,但我找不到更多关于实际数据结构的细节。例如,似乎每个块都以

开头
 0x30 0x84 0x0 0x0

从那里开始,在块的实际数据之前的剩余字节存在一些可变性。例如searchResEntry 的前 17 个字节是

30 84 00 00 0b 8f 02 01 0c 64 84 00 00 0b 86 04 3b

30 84 00 00 - block header
0b 8f - size of entire searchResEntry remaining
02 - I believe represents a type code where the next byte (01) is a length and 0c is the messageId.
64 84 00 00 - No idea
0b 86 - size of entire searchResEntry remaining
04 - some type code
3b - length of block data

但是其他以30 84 00 00 开头的块不是 17 字节长。

我查看了 rfc4511,但它们只是提供了一个无用的符号,实际上并没有描述字节的含义。

searchResultEntry ::= [APPLICATION 4] SEQUENCE {
             objectName      LDAPDN,
             attributes      PartialAttributeList }

我也看过 Wireshark 的packet-ldap.c,但很难理解。我认为要找到对数据结构布局和相关标志的良好描述并不难。

【问题讨论】:

    标签: networking ldap protocols


    【解决方案1】:

    LDAP 协议根据国际电联定义的标准 ASN.1 BER 编码规则进行编码。完整规格在这里:https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf

    【讨论】:

      猜你喜欢
      • 2010-12-02
      • 2019-09-25
      • 1970-01-01
      • 2011-06-14
      • 2010-12-24
      • 2023-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多