develooper Front page | perl.ldap | Postings from December 2021

Re: Net::LDAP not returning SEQUENCE data type

Thread Previous | Thread Next
From:
Chris Ridd via perl-ldap
Date:
December 16, 2021 17:40
Subject:
Re: Net::LDAP not returning SEQUENCE data type
Message ID:
5FE914A3-A5F8-4311-B254-190100276478@mac.com


> On 15 Dec 2021, at 22:27, johnhirsch via perl-ldap <perl-ldap@perl.org> wrote:
> 
> Hi. I am working on migrating a perl script that uses Net::LDAP from HP-UX to RedHat Linux. When running the script on RedHat Linux, the debug seems to indicate that Net:LDAP is returning a 00 for the ASN1 data type instead of the standard 30:
> 
> 00 82 07 4D 02 01 03 64 82 07 46 04 2D 75 69 64 ...M...d..F.-uid
>  
> Everything else is identical to the script running on HP-UX, including all of the data returned. Only the ASN1 type is different. This is what I see in HP-UX
> 
> 30 82 07 4D 02 01 03 64 82 07 46 04 2D 75 69 64 0..M...d..F.-uid
>  
> This results in a decode error since the data type is incorrect.
> 
> decode error 00<=>30 0 8  at /opt/perl/Convert-ASN1-0.33/lib/Convert/ASN1/_decode.pm line 117
> 
> The working script is actually using a very old version of Net::LDAP and Convert:ASN1, while the non-working script was updated to the latest versions to see if that would resolve the issue. It hasn’t, so I’m guessing that there is something else preventing Net::LDAP from returning the correct value for the ASN1 data type. Any ideas on why this would be happening and how to get Net::LDAP to return the correct data type? Any assistance would be appreciated. Thanks!

That’s rather strange. Can you compare bytes captured by Wireshark with what Net::LDAP’s debug is writing? If the bytes are indeed different then it sounds more like an issue with Convert::ASN1. The new maintainer of that package is quite active so raising an issue with him on GitHub would be a good next step.

https://github.com/timlegge <https://github.com/timlegge>

Good luck!

Chris
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About