On Sep 22, 2009, at 1:25 PM, Dieter Kluenter wrote:

Graham Barr <gb...@pobox.com> writes:

On Sep 22, 2009, at 11:29 AM, Dieter Kluenter wrote:

Graham Barr <gb...@pobox.com> writes:

On Sep 22, 2009, at 4:35 AM, Dieter Kluenter wrote:

[...]
OK, here it is:

0087   28:     SEQUENCE {
0089   23:       STRING = '2.16.840.1.113730.3.4.9'
00A2    1:       BOOLEAN = TRUE
00A5     :     }

that is weird.

that should be

0000   46: SEQUENCE {
0002   23:   STRING = '2.16.840.1.113730.3.4.9'
001B    1:   BOOLEAN = TRUE
001E   16:   STRING
0020     :     30 0E 02 01 00 02 01 13 A0 06 02 01 01 02 01 00
0...............
0030     : }

which is what I got when I ran this test script



use Net::LDAP::Control::VLV;
use Net::LDAP::ASN qw(Control);
use Convert::ASN1 qw(:debug);
use Data::Dumper;

$vlv = Net::LDAP::Control::VLV->new(
 before   => 0,
 after    => 19,
 content  => 0,
 offset   => 1,
 critical => 'TRUE'
);

print Dumper($vlv);
$vlv->to_asn;
print Dumper($vlv); # should add 'value' element to object hash

$d = $Control->encode($vlv);

asn_dump($d);


Do you have the most up to date perl-ldap installed ?

Yes, the version is 0.39
Running your test script, I get the same result as you.

Then I am totally at a loss of where it is going wrong.

->to_asn should be called on the control in Net::LDAP::_options, but it seems that it is not. If you can track down why then we can fix it but I cannot reproduce it right now.

Graham.

Reply via email to