Re: Schema OID definition limits
Hallvard B Furuseth <[email protected]> Fri, 8 Apr 2011 00:51:32 +0200
| Newsgroups | gmane.ietf.ldapext |
|---|---|
| Message-ID | <[email protected]> |
Mark Hinckley writes: > Is there a limit defined in the LDAP RFCs anywhere for the length of > the OID value for a schema definition, for example inetOrgPerson is > 2.16.840.1.113730.3.2.2, whereas organization is 2.5.6.4. I don't think so. Object identifiers are defined by ASN.1, the LDAP RFCs just refer to it. > Is there a > maximum length defined for how long that digit string can be for > custom schema? For example, should > 1.2.840.112233.1.1234.5678.12345.1234.123456.1234 be considered legal? That's a valid OID. There are some limits: 1st component must be <= 2. If 1st comp. <= 1, then 2nd component must be < 40. That's due to the ASN.1/BER representation of OIDs, which represents the first two components as one number 40*<1st component> + <2nd component>. Finally, your OIDs might meet a quick-and-dirty implementation which represents OID components as fixed-size machine integers. So it may be advisable to stick to components < 2**31, and 2nd component < 2**31/40. Or nowadays, perhaps I should be saying 63 instead of 31 bits. (The final bit would be for the sign, or for a "this is the last OID component" flag.) -- Hallvard