Subject: | Decode Error not descriptive enough to determine cause of error |
Date: | Wed, 15 Mar 2006 12:14:23 -0000 |
To: | <bug-Convert-ASN1 [...] rt.cpan.org> |
From: | "Jones Donald-dojones1" <Donald.Jones [...] motorola.com> |
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Hi,
I am trying to decode some ASN1 using Convert::ASN1 (0.20 off CPAN) and
am getting a decode error which is a bit too cryptic for me to
understand. I am able to successfully decode this message under
Javascript and C++, but was concerned that there may be some restriction
in the ASN1 Perl decoder that I was unaware of. For instance the
presence of an OPTIONAL field in the ASN1.
The ASN1 definition is held in np_asn1.pm (attached).
Error Message:
decode error a0<=>02 20 2 np-hsap-cluster-id at
/home/marhind1/usr/local/lib/perl5/site_perl/5.8.0/Convert/ASN1/_decode.
pm line 107.
$VAR1 = undef;
decode error a0<=>02 20 2 np-hsap-cluster-id at
/home/marhind1/usr/local/lib/perl5/site_perl/5.8.0/Convert/ASN1/_decode.
pm line 107.
...propagated at ./asn1_test.pl line 17.
Decode function (from np_asn1.pm):
sub np_asn_decode($)
{
my $data = shift;
my $asn = Convert::ASN1->new;
$asn->prepare($NP_ASN_DATA);
my $asn_msg = $asn->find("NP-Message-T");
my $charenc = hex2char($data);
my $msg = $asn_msg->decode($charenc);
print $asn_msg->error() if !defined $msg;
return $msg;
}
String to decode:
303e300602010002010ba0341a064e4f49535932a003020100020100301e1a093138302e
34323433321a0732332e343536371a08333435362e3738390202012c
Your input would be much appreciated.
Show quoted text
________________________________
Donald Jones MEng(Hons) MIEE CEng
Senior Software Engineer
Motorola Networks GSD
HSAP SPROC Development
Email : donald,jones@motorola.com <mailto:donald.jones@motorola.com>
Tel : +44(0)1793 565970
Mob : +44(0)771 2933219
THAMESDOWN DRIVE
SWINDON
WILTSHIRE
SN25 4XY
POPI:
Motorola General Business Information
Motorola Internal Use Only
Motorola Confidential Proprietary
[ X ]
[ ]
[ ]
________________________________