Perl
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Perl

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 3rd, 2008, 03:30 PM
Daniel Stutz
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

Hi all,

I am trying to implement an Net::LDAP::Extension and hit the wall, when
the first LDAPResponse from the server arrives.
ASN1::_decode returns an error, when it is called on that LDAPResponse,
which should contain an ExtendedResponse.

I extended Net::LDAP to write the pdu to a file before it calls
LDAPResponse->decode on it.
The pdu is attached. As well as the ASN1 extracted from Net::LDAP::ASN
and a small scrip, that also can't parse the pdu.

Kind regards,
Daniel

0xys
=JJte'>function.date</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'America/New_York' for 'EST/-5.0/no DST' insteadSt@,SLxSvS`Sd<StS<xSl~SwS@lSD<~SS*QvSsSS|S sS@J@JaS,~S@ ~SDSSS|SdnS\wS4@ SkSrSlS@sSS* SDSSsSd_StSfield2A S(S*«SS4SSfield3 AShS*=«@SStSS field49(S*S(ZkS dSS4SSlStempAhSS*^« SSStSkSfield5A*S  S*«SS,SSfield6 AS`S*«8SDSlSS field8A S*S**«xSSS,S<field7A`SS*«S$ nNSlSfield9A*S S+J$SdS,SS^Sfield10 AS`S.>z 8SSlSSsubfoldersA S*S-Ѱ<
xS$SS,SpmfoldersA`S S-
.|
SSSlSbuddylistA*S  S.W SS,SS zSignorelistAS`S-3
8SDSlSSLsSsignatureA S*S/] xSSS,StSSsearchprefsA`S S.C SSSlSxSavatarpat hI*S(S3\SdS4SSlS hascustomavatarISpS2V7 @SS|SSavatardateline A(SS)C2 SSS4Sl evelApSS/! ȉSSS|SdoSedit_useridIS 8S1j>SdSDSSedit_username ISS1JPSSSS edit_datelineA8SS/w( SS̊SDSedit_reasonIS S1 W؊S SSSpagetext_htmlAS HS-7
S$ STS̊ShasimagesASS-An
`SQOSSpostcountAHS ȋS-C
*S"SԋSTSmusernameISS5 ǷoS*SSdisplaygrouptitle IȋSXS4(S*dSԋSrS displayusertitleASS/̅C pS"SSS\SislastshownAXS،S/" S!SdSattachmentsAS S*9S@$STSpostid A،SXS,J:Z 0S@dSSTSthreadidAS S,u2 pS@S$S*SusernameAXS ؍S*ESSSdS$Suserid ASS)"S_S$SStitleA SXS,k 0S@dSSdatelineAS S,3Z pSNS$SpagetextAXS ؎S/gtN S,hNSdSallowsmilieIS pS18^S4N|SSSshowsigna ture90SS'M|8S\< S<Sref<SsSP*S@؎SS-]\
S@SS̺SipaddressApS S*gȏS|QS|SSiconid AS0S+7St@<SSvisibleASpS, HS$IO|SSSparentidA0S S*: ES@S<SSattachApSS-ȡg
ȐSQS|Swarn_flagAS 0S03C
SLhN<SSSSisusenetpostAS S)ٙ|HSL@,SS SmsgidAhSS-:
S\lNStS*SdayspruneSSApS S-h-+
ȑStzNĖS|SlastvisitSS*@ `S@ S@S/g S$@LS,S$*Sreport_flagAS S0 
XSKS S|*Spostusername9@SS& S@ĒSLSDSipAS S/-ty ВStQSSusergroupidAS 8S,8c StRODSĒSSpasswordAS xS)xcPSD@SSemail A8SS+**S@ēSDS styleidAxSS/:f ГSt@SSparentemailAS 8S,R|o ST@DSēS\Shomepage9S pS'W|PS4@|SS4Sicq9 8SS' |S@SDSaimApSS )o5)S@S|StSyahoo AS(S-
SkN4SSusertitleAS hS/4 @SlNtSSDScustomtitleA(S pS,8 S<lN|S4SjoindateASS, b S4KS$SwarningsSLSIS 0S1ZS$oN<SSwarning_levelASpS 0^&
HSDoN|SSSwarning_bansI0S p*S-~ը
SdoN|*S<StimespentSDSHASS0 9
ЖSzNSSlastactivityAS 8S,"F SzNDSĖSlastpostAS xS)v:PSKSSSposts I8SS2doSK̗SDS |StimezoneoffsetAxSS+f ؗSK SSpmpopupAS@S,q < SKLS̗SavataridAS S+bXSt@S SoptionsA@SS,
X S@̘SLS<SbirthdayASS,>2 ؘS@ SSmaxpostsAS@S/H SԷ@LS̘SstartofweekAS S.O* XSUOS SreferreridA@SS+ S@̙SLSpmtotalAS S,ҷ ؙSlN SSpmunreadAS@S0 :
SmNLS̙S$Spassworddate9S xS(9
WXS$mNS SsaltA@SS.y4 SDmN ĚSLSlSshowvbcode9xSS'3 ̚|КSdmNSSSmsnAS0S )QSmN<SĚSskypeASpS)cY; 'HSmN|SSxfireA0 SS.RR SmNS<SgoogletalkIpSS23 țSmNS|SĚSavatarrevisionI S@S2SnNLSSmem bergroupidsISS2mXS SSSԜSdisplaygroupidA@S ȜS.0{ *SDnNԜSLSܣSreputation ISS5w SdnNSSLS *SreputationlevelidAȜSPS. (SnN\SԜSlanguageidAS S0_,
hSnNSSSthreadedmodeAPS НS.RB SnNܝS\Semailstam pISS1`SnN$SS autosubscribeIНSS3 0SoNSܝSS<Sbirthday_searchAS*S-+fb
xSeRSĮS<Slotgd_expSA`SS-pHb
SLfRSlSlotgd_posA*S  S-B
SfR,SSSlanguages<S9SXS(r%8S gRdSSSbeboSA SS,- pS,gRS,SSSfacebookS\SAXS ؟S+dSgRSdSSmyspace SAS*S):9SS$*SS|SZS orkutSSA؟SS*«0*Sľ@ SS Sfield1<SlSPSBNS|S@pS*S* . *SoN*S|SLSLSshoutsAp *S*S/ *SoN*S|*S|SshoutbannedA*S 0S.n SdyN<S*SdSwarn_notesA*SpS* 1HSyN|S*SalertsA0 SS+SyNS<SStopuserApSS-j˜
ȡSyNS|SSuttpointsIS 8S4*hSyNDSSԴSuttstore_ historyISS1PSzNtQ Suttstore_glowI8SȢS5 dShRԢSQSuttstore_bankda taISS6J!3S<hRSSĮSuttstore_bankqueueAȢS PS, (S\hR\SԢSrpgclassAS S+WhS|hRSSrpgrace APSУS-dtb
ShRܣS\SSalignmentAS S+0a9WShRSSSrpgtype AУSPS-)
(ShR\SܣSSrpggender9S S&{ hShRSShpAPS ȤS)0@
*SiRԤS\Smaxhp9 SS& S<iR SSmaAȤS@S)C@
S\iRLSԤS<Smaxma9SxS&ŝ XS|iRS SSppA@SS)R@
SiRĥSLSmaxpp9x SS&] ХSiRSSapAS0S +ϣSiR<SĥSelementASpS,x HSiR|SSSinbattle90S S&Ϳ S\jRS<Sxp9pSS(];S|jRS|SSclanAS S,*; SjR,SSSrpgstatsAS `S,& 8SjRlSSSchalableA S*S+yxS\kRS,SScaptcha I`SS3SkRSlS inmonsterbattleA*S(S*: SkR4SS4StoprpgA ShS. @S<lRtSSarcade_banA(SS0 7]
SlRS4SSTStimes_playedIhS S1߸SlRStSSdSis_arcade _modAS0S-Rc
SmR<SSSfav_gamesASpS-+
HS|mR|SSlSuser_sortA0S S.v SmRS<Suser_orderApSS-
ȩS<nRS|Suser_g_ppAS0S-
SnR<SSuser_s_ppASpS-0i
HSnR|SS$Sdef_g_catA0S S-?
S\oRS<Sgame_skinIpSS4 ȪSoRS|Sarcade_mod_privsI S@S3SoRLSSS,Sarc ade_pmactiveASS0
XSoRSSgames_playedA@S S/|D S\pR̫SLStime_playedIS S1A<ثSpRSSarcade_points ASHS0
SpRTS̫SSTSarcade_spentASS .u `S<qRSSSarcade_wonAHSȬS/M *SqRԬSTSarcade_highIS *S2S4S*SScreate_to urneyIȬSX*S3~(*STSd*S ԬSԜSarcade_sess_gidI*S**S5 *fp*StS*S*Sarcade_sess_sta rtAX*S*S0-d
*SS*Sd*Sarcade_gtypeI**S (S2H@*SS4S*Sarcade_se ssionI*SpS8/|6@SS|S*SSvbclassified_credits I(SS5 KS4SĮS4Svbclassified_pcnt IpSS6
CЮSTSlS|SԢSvbclassified_score S`S4S4S̘SS SSLSSLSԤS SSSSTSS\S|S SlS *SܣSSSSL SZSS

Reply With Quote
  #2  
Old July 3rd, 2008, 06:10 PM
Chris Ridd
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

3 Jul 2008, at 20:20, Daniel Stutz wrote:

Hi all,
>

I am trying to implement an Net::LDAP::Extension and hit the wall,
when the first LDAPResponse from the server arrives.
ASN1::_decode returns an error, when it is called on that
LDAPResponse, which should contain an ExtendedResponse.
>

I extended Net::LDAP to write the pdu to a file before it calls
LDAPResponse->decode on it.
The pdu is attached. As well as the ASN1 extracted from
Net::LDAP::ASN and a small scrip, that also can't parse the pdu.
>

Kind regards,
Daniel
0xys
2.16.840.1.113719.1.27.100.81K0Efc9H m
R>=7!
o=MyQAcn=edir_test1,o=MyQALDAPRequest ::= SEQUENCE {

It seems to have got included inline as text, and mangled. If you
simply call $ldap->debug(2) before retrieving your result, can you
post the hex?

Cheers,

Chris

Reply With Quote
  #3  
Old July 4th, 2008, 07:20 AM
Daniel Stutz
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

Here we go:

30 81 83 02 01 03 79 7E 0A 01 00 04 00 04 00 80 0y~
1D 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 33 37 .2.16.840.1.1137
31 39 2E 31 2E 32 37 2E 31 30 30 2E 38 31 81 56 19.1.27.100.81.V
30 84 00 00 00 50 02 01 64 02 01 00 63 84 00 00 0Pdc
00 44 81 04 48 6D E0 AA 82 02 03 69 83 01 3C 84 .DHmi<.
04 B3 B4 B4 40 85 00 86 84 00 00 00 06 02 01 FF @
02 01 FF A7 84 00 00 00 1D 04 06 6F 3D 4D 79 51 o=MyQ
41 04 13 63 6E 3D 53 54 45 49 4E 42 41 43 48 2C Acn=STEINBACH,
6F 3D 4D 79 51 41 __ __ __ __ __ __ __ __ __ __ o=MyQA

Chris Ridd wrote:
It seems to have got included inline as text, and mangled. If you simply
call $ldap->debug(2) before retrieving your result, can you post the hex?

Reply With Quote
  #4  
Old July 4th, 2008, 10:01 AM
Graham Barr
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

Jul 4, 2008, at 2:18 AM, Daniel Stutz wrote:

Here we go:
>

30 81 83 02 01 03 79 7E 0A 01 00 04 00 04 00 80 0y~
1D 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 33 37 .2.16.840.1.1137
31 39 2E 31 2E 32 37 2E 31 30 30 2E 38 31 81 56 19.1.27.100.81.V
30 84 00 00 00 50 02 01 64 02 01 00 63 84 00 00 0Pdc
00 44 81 04 48 6D E0 AA 82 02 03 69 83 01 3C 84 .DHmi<.
04 B3 B4 B4 40 85 00 86 84 00 00 00 06 02 01 FF @
02 01 FF A7 84 00 00 00 1D 04 06 6F 3D 4D 79 51 o=MyQ
41 04 13 63 6E 3D 53 54 45 49 4E 42 41 43 48 2C Acn=STEINBACH,
6F 3D 4D 79 51 41 __ __ __ __ __ __ __ __ __ __ o=MyQA

What server are you using ?

That packet decodes as

0000 131: SEQUENCE {
0003 1: INTEGER = 3
0006 126: [APPLICATIN 25] {
0008 1: ENUM = 0
000B 0: STRING = ''
000D 0: STRING = ''
000F 29: [CNTEXT 0]
0011 : 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 33 37 31
2.16.840.1.11371
0021 : 39 2E 31 2E 32 37 2E 31 30 30 2E 38 31 __ __ __
9.1.27.100.81
002E 86: [CNTEXT 1]
0030 : 30 84 00 00 00 50 02 01 64 02 01 00 63 84 00 00
0Pdc
0040 : 00 44 81 04 48 6D E0 AA 82 02 03 69 83 01 3C
84 .DHmi<.
0050 : 04 B3 B4 B4 40 85 00 86 84 00 00 00 06 02 01
FF @
0060 : 02 01 FF A7 84 00 00 00 1D 04 06 6F 3D 4D 79
51 o=MyQ
0070 : 41 04 13 63 6E 3D 53 54 45 49 4E 42 41 43 48 2C
Acn=STEINBACH,
0080 : 6F 3D 4D 79 51 41 __ __ __ __ __ __ __ __ __ __ o=MyQA
0086 : }
0086 : }

Which is invalid.

APPLICATIN 25 is a IntermediateResponse which is defined as

IntermediateResponse ::= [APPLICATIN 25] SEQUENCE {
responseName [0] LDAPID PTINAL,
responseValue [1] CTET STRING PTINAL }

you server seems to be returning

CMPNENTS F LDAPResult,

inside the response, like other response types do, but
IntermediateResponse does not have these elements as per RFC 3771

Graham.

Reply With Quote
  #5  
Old July 4th, 2008, 10:40 AM
Daniel Stutz
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

Graham Barr schrieb:
What server are you using ?
It's a Novell eDirectory 8.7.X
I'm trying to use Novell LDAP Extensions.

Kind regards,
Daniel

Reply With Quote
  #6  
Old July 4th, 2008, 11:20 AM
Graham Barr
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

Jul 4, 2008, at 9:12 AM, Daniel Stutz wrote:

Graham Barr schrieb:
>What server are you using ?

It's a Novell eDirectory 8.7.X
I'm trying to use Novell LDAP Extensions.

Well I suspect that Novell have added some non-standard extensions
that clash with standard ones. Even if they did not clash they
probably would not work with Net::LDAP without modification.

I tried to look at their source but all the download links on their
site download a compressed HTML file instead of the .tar.gz it should
be.

Graham.

Reply With Quote
  #7  
Old July 7th, 2008, 11:01 AM
Daniel Stutz
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

Thanks for the help. I have switched to a patched server now.
The converter fails now on the next pdu. I can't find the

The type should be:

responseValue ::= SEQUENCE {
eventType INTEGER,
resultCode INTEGER,
eventData CTET STRING PTINAL }

and eventData has the following structure:
generalEventData ::= SEQUENCE {
dstime INTEGER,
milliseconds INTEGER,
curProcess INTEGER,
verb INTEGER,
perpetratorDN CTET STRING,
integerValues SEQUENCE F INTEGER,
stringValues SEQUENCE F CTET STRING }

Decoding the following data as responseValue fails and I can't see why:
30 84 00 00 00 65 02 01 64 02 01 00 63 84 00 00 0edc
00 59 81 04 48 75 9F AA 82 02 00 89 83 01 AA 84 .YHu
04 AB 63 1B A0 85 1D 63 6E 3D 76 73 6C 65 73 31 ccn=vsles1
2D 69 31 2C 6F 75 3D 72 65 73 6F 75 72 63 65 2C -i1,ou=resource,
6F 3D 71 61 86 84 00 00 00 06 02 01 00 02 01 FF o=qa
A7 84 00 00 00 15 04 04 6F 3D 71 61 04 0D 63 6E o=qacn
3D 61 64 6D 69 6E 2C 6F 3D 71 61 __ __ __ __ __ =admin,o=qa

0000 101: SEQUENCE {
0006 1: INTEGER = 100
0009 1: INTEGER = 0
000C 89: [APPLICATIN 3] {
0012 4: [CNTEXT 1]
0014 : 48 75 9F AA __ __ __ __ __ __ __ __ __ __ __ __ Hu
0018 2: [CNTEXT 2]
001A : 00 89 __ __ __ __ __ __ __ __ __ __ __ __ __ __
001C 1: [CNTEXT 3]
001E : AA __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ .
001F 4: [CNTEXT 4]
0021 : AB 63 1B A0 __ __ __ __ __ __ __ __ __ __ __ __ .c
0025 29: [CNTEXT 5]
0027 : 63 6E 3D 76 73 6C 65 73 31 2D 69 31 2C 6F 75 3D
cn=vsles1-i1,ou=
0037 : 72 65 73 6F 75 72 63 65 2C 6F 3D 71 61 __ __ __
resource,o=qa
0044 6: [CNTEXT 6]
004A : 02 01 00 02 01 FF __ __ __ __ __ __ __ __ __ __
0050 21: [CNTEXT 7] {
0056 4: STRING = 'o=qa'
005C 13: STRING = 'cn=admin,o=qa'
006B : }
006B : }
006B : }
decode error 12 107 at
/ line 233,
<DATAline 228.


Btw: Is there a more appropriate place for asking questions about
Convert::ASN1?

Thank you.

Kind regards,
Daniel

Reply With Quote
  #8  
Old July 7th, 2008, 11:40 AM
Graham Barr
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.

Jul 7, 2008, at 9:42 AM, Daniel Stutz wrote:

Thanks for the help. I have switched to a patched server now.
The converter fails now on the next pdu. I can't find the
>

The type should be:
>

responseValue ::= SEQUENCE {
eventType INTEGER,
resultCode INTEGER,
eventData CTET STRING PTINAL }

Looking at the data you got that should be

eventData [APPLICATIN 3] CTET STRING PTINAL}

and eventData has the following structure:
generalEventData ::= SEQUENCE {
dstime INTEGER,
dstime [1] INTEGER,
>

milliseconds INTEGER,
milliseconds [2] INTEGER,
>

curProcess INTEGER,

curProcess [3] INTEGER,

etc

Graham.

>

verb INTEGER,
perpetratorDN CTET STRING,
integerValues SEQUENCE F INTEGER,
stringValues SEQUENCE F CTET STRING }
>

Decoding the following data as responseValue fails and I can't see
why:
30 84 00 00 00 65 02 01 64 02 01 00 63 84 00 00 0edc
00 59 81 04 48 75 9F AA 82 02 00 89 83 01 AA 84 .YHu
04 AB 63 1B A0 85 1D 63 6E 3D 76 73 6C 65 73 31 ccn=vsles1
2D 69 31 2C 6F 75 3D 72 65 73 6F 75 72 63 65 2C -i1,ou=resource,
6F 3D 71 61 86 84 00 00 00 06 02 01 00 02 01 FF o=qa
A7 84 00 00 00 15 04 04 6F 3D 71 61 04 0D 63 6E o=qacn
3D 61 64 6D 69 6E 2C 6F 3D 71 61 __ __ __ __ __ =admin,o=qa
>

0000 101: SEQUENCE {
0006 1: INTEGER = 100
0009 1: INTEGER = 0
000C 89: [APPLICATIN 3] {
0012 4: [CNTEXT 1]
0014 : 48 75 9F AA __ __ __ __ __ __ __ __ __ __ __ __ Hu
0018 2: [CNTEXT 2]
001A : 00 89 __ __ __ __ __ __ __ __ __ __ __ __ __ __
001C 1: [CNTEXT 3]
001E : AA __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ .
001F 4: [CNTEXT 4]
0021 : AB 63 1B A0 __ __ __ __ __ __ __ __ __ __ __ __ .c
0025 29: [CNTEXT 5]
0027 : 63 6E 3D 76 73 6C 65 73 31 2D 69 31 2C 6F 75 3D
cn=vsles1-i1,ou=
0037 : 72 65 73 6F 75 72 63 65 2C 6F 3D 71 61 __ __ __
resource,o=qa
0044 6: [CNTEXT 6]
004A : 02 01 00 02 01 FF __ __ __ __ __ __ __ __ __
__
0050 21: [CNTEXT 7] {
0056 4: STRING = 'o=qa'
005C 13: STRING = 'cn=admin,o=qa'
006B : }
006B : }
006B : }
decode error 12 107 at /
_decode.pm line 233, <DATAline 228.
>
>

Btw: Is there a more appropriate place for asking questions about
Convert::ASN1?
>

Thank you.
>

Kind regards,
Daniel
>

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Perl > decode error 30<=>73 0 8 at Convert/ASN1/_decode.pm line 106.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT