Net::LDAP not returning SEQUENCE data type

johnhirsch via perl-ldap <[email protected]> Wed, 15 Dec 2021 22:27:09 +0000
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <CH0PR07MB88608E847C1E8ACB4784107EAA769@CH0PR07MB8860.namprd07.prod.outlook.com>
--_000_CH0PR07MB88608E847C1E8ACB4784107EAA769CH0PR07MB8860namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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 t=
o indicate that Net:LDAP is returning a 00 for the ASN1 data type instead o=
f 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 i=
n 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<=3D>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 Co=
nvert: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 th=
ere 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 t=
o get Net::LDAP to return the correct data type? Any assistance would be ap=
preciated. Thanks!

John Hirsch



This e-mail and any attachments may contain confidential information of Nor=
thwestern Mutual. If you are not the intended recipient of this message, be=
 aware that any disclosure, copying, distribution or use of this e-mail and=
 any attachments is prohibited. If you have received this e-mail in error, =
please notify Northwestern Mutual immediately by returning it to the sender=
 and delete all copies from your system. Please be advised that communicati=
ons with {SECURE MESSAGE} in the subject line have been sent using a secure=
 messaging system. Communications that do not have this tag may not be secu=
re and could be observed by a third party. Our commitment to privacy: At No=
rthwestern Mutual, your privacy is important to us. For more information ab=
out our privacy practices, please review our privacy notices.=20



--_000_CH0PR07MB88608E847C1E8ACB4784107EAA769CH0PR07MB8860namp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#0563C1" vlink=3D"#954F72" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi. I am working on migrating a perl script that use=
s Net::LDAP from HP-UX to RedHat Linux. When running the script on RedHat L=
inux, the debug seems to indicate that Net:LDAP is returning a 00 for the A=
SN1 data type instead of the standard
 30:<br>
<br>
00 82 07 4D 02 01 03 64 82 07 46 04 2D 75 69 64 ...M...d..F.-uid<o:p></o:p>=
</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Everything else is identical to the script running o=
n HP-UX, including all of the data returned. Only the ASN1 type is differen=
t. This is what I see in HP-UX<br>
<br>
30 82 07 4D 02 01 03 64 82 07 46 04 2D 75 69 64 0..M...d..F.-uid<o:p></o:p>=
</p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">This results in a decode error since the data type i=
s incorrect.<br>
<br>
decode error 00&lt;=3D&gt;30 0 8&nbsp; at /opt/perl/Convert-ASN1-0.33/lib/C=
onvert/ASN1/_decode.pm line 117<br>
<br>
The working script is actually using a very old version of Net::LDAP and Co=
nvert:ASN1, while the non-working script was updated to the latest versions=
 to see if that would resolve the issue. It hasn&#8217;t, so I&#8217;m gues=
sing that there is something else preventing
 Net::LDAP from returning the correct value for the ASN1 data type. Any ide=
as on why this would be happening and how to get Net::LDAP to return the co=
rrect data type? Any assistance would be appreciated. Thanks!<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">John Hirsch<o:p></o:p></p>
</div>

<DIV>
<br><BR>
This e-mail and any attachments may contain confidential information of Nor=
thwestern Mutual. If you are not the intended recipient of this message, be=
 aware that any disclosure, copying, distribution or use of this e-mail and=
 any attachments is prohibited. If you have received this e-mail in error, =
please notify Northwestern Mutual immediately by returning it to the sender=
 and delete all copies from your system. Please be advised that communicati=
ons with {SECURE MESSAGE} in the subject line have been sent using a secure=
 messaging system. Communications that do not have this tag may not be secu=
re and could be observed by a third party. Our commitment to privacy: At No=
rthwestern Mutual, your privacy is important to us. For more information ab=
out our privacy practices, please review our <a href=3D"https://www.northwe=
sternmutual.com/privacy-notices/">privacy notices</a>. <BR>
<br><BR>
</DIV></body>
</html>

--_000_CH0PR07MB88608E847C1E8ACB4784107EAA769CH0PR07MB8860namp_--