From: Graham B. <gb...@po...> - 2002-06-06 12:51:26
|
On Thu, Jun 06, 2002 at 05:31:08AM -0700, Murugan K G wrote: > Hi > I may be asking very simple question since i am > very new to LDAP stuff. Thanks for your answers. > I am getting "Could not decode LDAP extension packet" > error messasge. > May be i am sending wrong encoded message from the > client as below. Any ideas?. Perhaps it would help if you described what you are trying todo and not just ask "what is wrong with this code" Graham. > > Any help mostly welcome. > > Thanks in advance. > > Regards > K.Murugan > > my $mesg = $ldap->message('Net::LDAP::Extension' => > $arg); > > $ldap->start_tls(); > > $asn = Convert::ASN1->new; > $asn->prepare(q< > [APPLICATION 23] SEQUENCE { > flags INTEGER, > dn LDAPDN > }>); > > $pdu = $asn->encode( flags => 0, dn => > "ou=test,o=xxxx"); > > $out = $asn->decode($pdu); > print $out->{flags}," ",$out->{dn},"\n"; > > > $mesg->encode > ( > extendedReq =>{ > requestName => > '2.16.840.1.113719.1.27.100.3', > ##################################### > requestValue => $pdu > ####################################### > } > )or die "Not able to encode the extended > values\n"; > > $response=$ldap->_sendmesg($mesg) or die "Not able > to send message\n"; > $mesg->sync(); > > if( $mesg->code ne LDAP_SUCCESS) > { > print "LDAP ERROR\n "; > print "The response name is ". > $response->{responseName}; > $ldap->unbind(); > } > else > { > print "The response name is ". > $response->{responseName}; > $ldap->unbind(); > } > print "Ldap extension operation result", > ldap_error_name($mesg->code),"\n"; > print $mesg->error; > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > |