Comments (4)
It is correct that the LDAP SDK does not support multi-byte BER types. However, I am not aware of any case in which LDAP communication makes use of multi-byte types. The LDAP SDK's ASN.1 support is primarily intended for use in conjunction with LDAP and does not attempt to provide general-purpose ASN.1 support. Is there an LDAP-specific use case that requires multi-bye type support?
from ldapsdk.
yes, that's true, I wanted to use your sdk for pure ASN.1 parsing. But LDAP RFC clearly specifies ASN.1 BER limitations in LDAP protocol - one byte types are not there :-)
from ldapsdk.
For sure this is rarely found :)
But it can be found in the Microsoft LDAP world :)
Especially on the LDAP_SERVER_GET_STATS_OID in the response to the control described, provided the server is at least 2008 or later and a specific flag is set in the request control.
The BER encoding of the following ASN.1 structure:
StatsResponseValueV4 ::= SEQUENCE OF SEQUENCE {
statisticName OCTET STRING
CHOICE {
intStatistic [0] INTEGER
stringStatistic [1] OCTET STRING
}
}
For sure this is not a control used a lot. And even the .NET API does not provide any method to correctly decode this sequence. At least in the System.DirectoryServices.Protocols namespace.
from ldapsdk.
There's nothing in the example that you've provided that would require a multi-byte BER type.
First, the simple elements: The outer SEQUENCE and each inner SEQUENCE will have a type of 0x30. The statisticName OCTET STRING will have a type of 0x04.
The CHOICE component is only slightly more complicated. The value can either be an integer or an octet string, and which one is actually used is indicated by the BER type of the element. In this case, the definition provides the tag number to use, and it's provided alone surrounded by square brackets, which means that it uses the context-specific class. Both of the options (INTEGER and OCTET STRING) are primitives, so this encoding is also pretty straightforward: you'd use 0x80 to denote an intStatistic and 0x81 to denote a stringStatistic.
The issue with a multi-byte type would only arise if you need to use a tag number that is greater than or equal to 31. The LDAP SDK doesn't currently support that, but I've never encountered a case in which it has been needed.
from ldapsdk.
Related Issues (20)
- Unable to add entries to LDAP server HOT 1
- Is there way to use objectGuid instead of dn in API ? HOT 1
- What is the best option to remove object by objectGuid ? HOT 2
- Is there way to add user to multiple groups using single ldap request ? HOT 5
- How to get group by primaryGroupId ? How to convert primaryGroupId to groupDn? HOT 8
- How to search entry by operational attribute (PrimaryGroupToken)? HOT 2
- search with ALL_OPERATIONAL_ATTRIBUTES doesn't return any operational attributes HOT 2
- Filter.createSubstringFilter with "subInitial" or "subFinal" set to an empty string HOT 1
- Unable to login with AdditionalBindCredentials when certain OperationTypes are part of AuthenticationRequiredOperationTypes (Supressing Anonymous Connections) HOT 3
- Metric to show potentially available connections HOT 3
- Memory 'leak' in GSSAPIBindRequest HOT 5
- transactions support in unboundid ldap HOT 3
- Is there way to encrypt LDAP password ? (at least Base 64) HOT 1
- Is there way to get page number N during pagination request without iterating over previous pages ? HOT 13
- IdleTimeout parameter for pooled connections HOT 6
- KeyStoreKeyManager doesn't expose alternative KeyStore loading mechanisms. HOT 4
- InMemoryDirectoryServer is single threaded and blocks for searches HOT 1
- Simple bind fails if password contains latin character HOT 2
- multihomed ldap server HOT 3
- Unable to read or decode an LDAP message: Invalid value length of 0 for an ASN.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldapsdk.