directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject Re: isHumanReadable in LdapSyntax
Date Thu, 05 Mar 2015 18:08:35 GMT
Le 05/03/15 18:39, Radovan Semancik a écrit :
> On 03/05/2015 06:18 PM, Emmanuel Lécharny wrote:
>> Woot ! You went through the intricacy of teh ASN/1 encoder/decoder on
>> your own ! Taht's impressive ! L'll have a look and probably add it
>> into the API. 
> Thanks. But never underestimate the power of copy&paste :-)
> It is not hard to figure it out. I've already implemented VLV controls
> for JNDI before. And other controls implemented in the directory API
> are quite a good examples to get started. None of them used the ASN.1
> choice, though, so I had no place to copy this piece from. I've used a
> literal (0xa0), but I assume that there is a nicer way to do that. I
> mean the encoding of this part of VLV request control:
>           target       CHOICE { ...
We declare the tags in a XXXTags file, like in :

public enum PasswordPolicyTags
    PPOLICY_WARNING_TAG(0xA0), // warning [0]
    PPOLICY_ERROR_TAG(0x81), // error [1]
    TIME_BEFORE_EXPIRATION_TAG(0x80), // timeBeforeExpiration [0]
    GRACE_AUTHNS_REMAINING_TAG(0x81); // graceAuthNsRemaining [1]

One thing that is missing is the choice between byteOffset and an
assertionValue : we should have a flag in the impl to determinate which
of the two is in use.

the contextID might be empty, and might be absent from the PDU. Those
are 2 different use cases. We should cover both.

The VLV control will probably be put into the codec-extras module.

I'll check that tonite !

View raw message