> 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

Reply via email to