Re: Net::LDAP not returning SEQUENCE data type
Chris Ridd via perl-ldap <[email protected]> Thu, 16 Dec 2021 17:40:47 +0000
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_E15FBD0E-345C-42C9-8583-1D61477D9D42 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 15 Dec 2021, at 22:27, johnhirsch via perl-ldap = <[email protected]> wrote: >=20 > 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: >=20 > 00 82 07 4D 02 01 03 64 82 07 46 04 2D 75 69 64 ...M...d..F.-uid > =20 > 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 >=20 > 30 82 07 4D 02 01 03 64 82 07 46 04 2D 75 69 64 0..M...d..F.-uid > =20 > This results in a decode error since the data type is incorrect. >=20 > decode error 00<=3D>30 0 8 at = /opt/perl/Convert-ASN1-0.33/lib/Convert/ASN1/_decode.pm line 117 >=20 > 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=E2=80=99t, so = I=E2=80=99m 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=E2=80=99s rather strange. Can you compare bytes captured by = Wireshark with what Net::LDAP=E2=80=99s 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= --Apple-Mail=_E15FBD0E-345C-42C9-8583-1D61477D9D42 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br = class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On 15 Dec 2021, at 22:27, johnhirsch via perl-ldap <<a = href=3D"mailto:[email protected]" class=3D"">[email protected]</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><meta = charset=3D"UTF-8" class=3D""><div class=3D"WordSection1" style=3D"page: = WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; = font-size: 12px; font-style: normal; font-variant-caps: normal; = font-weight: normal; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><div style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D"">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:<br class=3D""><br = class=3D"">00 82 07 4D 02 01 03 64 82 07 46 04 2D 75 69 64 = ...M...d..F.-uid<o:p class=3D""></o:p></div><div style=3D"margin: 0in; = font-size: 11pt; font-family: Calibri, sans-serif;" class=3D""><o:p = class=3D""> </o:p></div><div style=3D"margin: 0in; font-size: 11pt; = font-family: Calibri, sans-serif;" class=3D"">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<br class=3D""><br class=3D"">30 82 07 4D 02 01 03 64 82 07 46 04 = 2D 75 69 64 0..M...d..F.-uid<o:p class=3D""></o:p></div><div = style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D""><o:p class=3D""> </o:p></div><div = style=3D"margin: 0in; font-size: 11pt; font-family: Calibri, = sans-serif;" class=3D"">This results in a decode error since the data = type is incorrect.<br class=3D""><br class=3D"">decode error = 00<=3D>30 0 8 at = /opt/perl/Convert-ASN1-0.33/lib/Convert/ASN1/_decode.pm line 117<br = class=3D""><br class=3D"">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=E2=80=99t, so I=E2=80=99m 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!</div></div></div></blockquote><div><br = class=3D""></div><div>That=E2=80=99s rather strange. Can you compare = bytes captured by Wireshark with what Net::LDAP=E2=80=99s 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.</div><div><br class=3D""></div><div><a = href=3D"https://github.com/timlegge" = class=3D"">https://github.com/timlegge</a></div><div><br = class=3D""></div><div>Good luck!</div><div><br = class=3D""></div><div>Chris</div></div></body></html>= --Apple-Mail=_E15FBD0E-345C-42C9-8583-1D61477D9D42--