Re: Manage IA5strings with Perl LDAP

Clément OUDOT <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <[email protected]>
> On Nov 25, 2008, at 9:45 AM, Clément OUDOT wrote:
>> Hello,
>>
>> after some research on the net, I can't find any perl code that can
>> read/write IA5strings.
>
> IA5Strings are basically ASCII strings. The only printable differences
> is that IA5 does not have $ or ~
>
> see http://www.zytrax.com/tech/ia5.html
>
>> I suppose we have to use the ASN1 functions, is it right? The goal
>> for is
>> to be able to read/write values for example the logonHours attribute
>> in
>> Active Directory.
>
> It would seem to me that AD defined logonHours as IA5String as it allows
> bytes of any value as logonHours seems to be a bit packed string, see
>
> http://forums.sun.com/thread.jspa?messageID=10389841#10389841
>
> With Net::LDAP you should be able to pack the string as required for
> the logonHours definition and pass it as the attribute value
>

Thanks for your answer. I have to translate java code to perl ;) But
another question, it seems the value we get from AD is binary, I use the
"raw" attribute in Net::LDAP search but the value I get is not what I can
see with an ldapsearch... Is there a better way to manage binary data in
perl-ldap ?

Clément.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.