I am trying to use a slightly modified version of the Net::LDAP example scripts with paging and callbacks against Oracle Internet directory.
I am using perl 5.14.2 and very fresh versions of all the CPAN modules.
The script fails with:
LDAP Search Failed: decode error 22 75 at
/run/pd/csm/64-bit/cpan/5.14.2-2011.11/lib/Convert/ASN1/_decode.pm line
233, <DATA> line 522.
And yet, a paged openldap ldapsearch works just fine (with "-E
!pr=10/noprompt").
If I strip out the paging code, the script works, but I really need to
be able to use that extension.
Here's the code:
...
my $page = Net::LDAP::Control::Paged->new( size => 2 ); # keeping the size
small for illus. purposes
my @args = ( base => $base,
scope => 'sub',
filter => $query,
attrs => \@attrs,
callback => \&callback,
control => [ $page ] );
my $cookie;
my $i = 1;
while(1) {
$ldap->debug(2);
my $search = $ldap->search(@args);
$search->code and do {
exit print "LDAP Search Failed: " . $search->error . "\n";
}
...
}
...
Running the script yields:
Net::LDAP=HASH(0x10085c170) sending:
Net::LDAP=HASH(0x10085c170) received:
*an entry dump in hex*
dn: *dn of an entry*
Net::LDAP=HASH(0x10085c170) received:
*anonther entry dump in hex*
dn: *dn of another entry*
Net::LDAP=HASH(0x10085c170) received:
30 84 00 00 00 45 02 01 01 65 84 00 00 00 3C 0A 0....E...e....<.
01 00 04 00 04 00 A0 84 00 00 00 2F 30 84 00 00 .........../0...
00 29 04 16 31 2E 32 2E 38 34 30 2E 31 31 33 35 .)..1.2.840.1135
35 36 2E 31 2E 34 2E 33 31 39 01 01 00 04 0C 30 56.1.4.319.....0
0A 02 01 00 04 05 35 31 61 32 66 __ __ __ __ __ ......51a2f
LDAP Search Failed: decode error 22 75 at
/run/pd/csm/64-bit/cpan/5.14.2-2011.11/lib/Convert/ASN1/_decode.pm line 233,
<DATA> line 522.
Is there a known issue with Oracle Internet Directory?
Thanks in advance for any help debugging this.
jd
smime.p7s
Description: S/MIME cryptographic signature
