The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
ChangeLog 011
MANIFEST 88
META.yml 22
Makefile.PL 11
README 31
SIGNATURE 3131
inc/Module/Install/Base.pm 96
inc/Module/Install/Can.pm 41
inc/Module/Install/Fetch.pm 41
inc/Module/Install/Include.pm 42
inc/Module/Install/Makefile.pm 52
inc/Module/Install/Metadata.pm 41
inc/Module/Install/Win32.pm 41
inc/Module/Install.pm 64
inc/Test/Builder.pm 11
inc/Test/More.pm 11
lib/Convert/ASN1/Debug.pm 31
lib/Convert/ASN1/IO.pm 31
lib/Convert/ASN1/_decode.pm 84
lib/Convert/ASN1/_encode.pm 53
lib/Convert/ASN1/parser.pm 31
lib/Convert/ASN1.pm 13
lib/Convert/ASN1.pod 22
parser.y 31
t/00prim.t 17
t/06bigint.t 116
26 files changed (This is a version diff) 117113
@@ -1,3 +1,14 @@
+Convert::ASN1 0.20 -- Tue Feb 21 18:47:43 CST 2006
+
+Bug Fixes
+ * Fixed issues with decoding when calling script contains use encoding 'utf8'
+ * Allow zero-length timestamps to be extracted
+ * Fix incorrect length encoding for bitstrings
+
+Enhancements
+ * Support encoding bigint's as BCD
+
+
 Convert::ASN1 0.19 -- Mon Apr 18 19:40:32 CDT 2005
 
 Bug Fixes
@@ -1,10 +1,4 @@
 ChangeLog
-MANIFEST
-META.yml
-Makefile.PL
-OldChanges
-README
-SIGNATURE
 examples/ldap
 examples/ldap-search
 examples/x509decode
@@ -20,13 +14,19 @@ inc/Test/Builder.pm
 inc/Test/More.pm
 lib/Convert/ASN1.pm
 lib/Convert/ASN1.pod
-lib/Convert/ASN1/Debug.pm
-lib/Convert/ASN1/IO.pm
 lib/Convert/ASN1/_decode.pm
 lib/Convert/ASN1/_encode.pm
+lib/Convert/ASN1/Debug.pm
+lib/Convert/ASN1/IO.pm
 lib/Convert/ASN1/parser.pm
+Makefile.PL
+MANIFEST
+META.yml
 mkparse
+OldChanges
 parser.y
+README
+SIGNATURE
 t/0-signature.t
 t/00prim.t
 t/01tag.t
@@ -1,5 +1,5 @@
 name: Convert-ASN1
-version: 0.19
+version: 0.20
 abstract: Convert between perl data structures and ASN.1 encoded packets
 author: Graham Barr <gbarr@cpan.org>
 license: perl
@@ -9,4 +9,4 @@ requires:
 no_index:
   directory:
     - inc
-generated_by: Module::Install version 0.33
+generated_by: Module::Install version 0.37
@@ -22,7 +22,7 @@ sub MY::postamble {
 
   return <<POSTAMBLE;
 
-distdir : distsign
+mydist : manifest distsign dist
 
 run_byacc:
 	\$(PERL) mkparse parser.y lib/Convert/ASN1/parser.pm
@@ -7,7 +7,7 @@ a single pass, ASN1.pm can.
 Convert::ASN1 will parse ASN.1 descriptions and will encode from and
 decode to perl data structures using a hierarchy of references.
 
-Copyright (c) 2000-2002 Graham Barr. All rights reserved.
+Copyright (c) 2000-2005 Graham Barr. All rights reserved.
 This package is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
 
@@ -33,5 +33,3 @@ REPORTING BUGS
 If you find any bugs with Convert::ASN1, please report then via
 
   bugs-Convert-ASN1@rt.cpan.org
-
-$Id: README,v 1.4 2002/08/19 23:59:18 gbarr Exp $
@@ -1,12 +1,12 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.38.
+signed via the Module::Signature module, version 0.50.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
 
     % cpansign -v
 
-It would check each file's integrity, as well as the signature's
+It will check each file's integrity, as well as the signature's
 validity.  If "==> Signature verified OK! <==" is not displayed,
 the distribution may already have been compromised, and you should
 not run its Makefile.PL or Build.PL.
@@ -14,42 +14,42 @@ not run its Makefile.PL or Build.PL.
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 bb02d897d2bacfb9c209c61a619c0887d266b804 ChangeLog
-SHA1 e225103b65ac3cd06d8506582ba34e26ed6ddcb7 MANIFEST
-SHA1 e6168b53ec7fd7144bfd4f8f3d3098b2390f4583 META.yml
-SHA1 bfaa0b7273ff44168d38b5d27da19e57f259041e Makefile.PL
+SHA1 178454c7522b28c05cb996862d5d076998365f43 ChangeLog
+SHA1 381906407ac615f0d717a1659faa62e0da80271e MANIFEST
+SHA1 7cd5ca2acc1c07bcd2ba784ab3fe840c889b6ac7 META.yml
+SHA1 af43f56a5d74b7e0b2df6b22f8bed3569d3fdcab Makefile.PL
 SHA1 34baa595be366d4d07d3719e0ffedec7598dd5cb OldChanges
-SHA1 3a74186ae8ef08aaa10636f4fe6e7886ea4fb4ef README
+SHA1 7cc83435adcdb9fed2b794a9dcabdfce65d4bfc6 README
 SHA1 905b1f3ec388b43432882585f70627d81a2d64eb examples/ldap
 SHA1 731cdbffc8b4275c20f194422584b6278a728fa0 examples/ldap-search
 SHA1 6e4c1e451cff7552bd8cb3065be8283975d02bfb examples/x509decode
-SHA1 3f078f42a453f01e804ddd77e5826e7a27bde7c1 inc/Module/Install.pm
-SHA1 5edf750dabf25f41136bebff7a574bc4bfff4708 inc/Module/Install/Base.pm
-SHA1 0b2755693087e2cd877fee8d7df14eaf854d7b37 inc/Module/Install/Can.pm
-SHA1 40922248175f9a0ab2af35cc6a72f3f6d1bda1df inc/Module/Install/Fetch.pm
-SHA1 51a4662ddde9308ac5d727b71220ef44b6a047f2 inc/Module/Install/Include.pm
-SHA1 77f0d24632f08107b67bef1a22ea6f2023e60862 inc/Module/Install/Makefile.pm
-SHA1 946faffdf822ec2b5175517732ee24ac06d2d413 inc/Module/Install/Metadata.pm
-SHA1 ff56817eb18a9d7a528852d2b568c348629a14fb inc/Module/Install/Win32.pm
-SHA1 a485e469ac64908d7e965ae726b6a58682d74d8e inc/Test/Builder.pm
-SHA1 2e86c1ac237e606c365cfde0965bd662c86b6b35 inc/Test/More.pm
-SHA1 2fcfe31a77439deb752870ba8bca1ae8ee95f633 lib/Convert/ASN1.pm
-SHA1 12362fb498207ae570262dfa70ea308ed2c4e073 lib/Convert/ASN1.pod
-SHA1 83742c626d5bc608e6504a1b9d4efba0fb2dd2c1 lib/Convert/ASN1/Debug.pm
-SHA1 7b6d43da07bc54e7e9226458c3f207026a67ec15 lib/Convert/ASN1/IO.pm
-SHA1 dc1b70feedcde5623cf337cb76856787a44debaf lib/Convert/ASN1/_decode.pm
-SHA1 95f3f03fbb618fca2796c134ee2f83ff0d64078f lib/Convert/ASN1/_encode.pm
-SHA1 fd3541ec481c5d69b8aa9d04c8189773577df9ab lib/Convert/ASN1/parser.pm
+SHA1 4c89b7f2479289a00eaf9ae57d9c122540fd9cd3 inc/Module/Install.pm
+SHA1 13826150f529598f2c3eb2dc6e6ff9dbedea719a inc/Module/Install/Base.pm
+SHA1 43a82b58bba1e9a62847272a77b8a36e3024d2d6 inc/Module/Install/Can.pm
+SHA1 adacb128dc656e2279706970b3557e4cbeb8824d inc/Module/Install/Fetch.pm
+SHA1 f7f83139bba2a6be9c0e25df363ab4734360e70b inc/Module/Install/Include.pm
+SHA1 d9eea60368c5d41d7b646ce53121ca0dca17c118 inc/Module/Install/Makefile.pm
+SHA1 8424be1a0a8df45820d05825a778e39c323edb0f inc/Module/Install/Metadata.pm
+SHA1 5295c32def7d784450ed1dabbe818a02b6d8d4d5 inc/Module/Install/Win32.pm
+SHA1 522246c437e549c9800d79f49b47d1f3ea6c5934 inc/Test/Builder.pm
+SHA1 01f1639733208f244362f233368920a6e412c91e inc/Test/More.pm
+SHA1 d1f4614a1762f6f93e4d6b49ae4324f37cbc55f6 lib/Convert/ASN1.pm
+SHA1 85c8e45d0868048a0859918e51fbbb0fe9548ca7 lib/Convert/ASN1.pod
+SHA1 cb02389a8eab35ca72c6b93ea83f5900d4fbb675 lib/Convert/ASN1/Debug.pm
+SHA1 a301a25c40830189aa3946491cb6753d782ab20b lib/Convert/ASN1/IO.pm
+SHA1 711b03b8c1d1bdb9fa42ad282bb0f95e98a857ae lib/Convert/ASN1/_decode.pm
+SHA1 5ea58dd28d41ee33d20489b3a119b8162b54b1d0 lib/Convert/ASN1/_encode.pm
+SHA1 2d63e6344ca2fc6f1e517794df204df3c7db40d0 lib/Convert/ASN1/parser.pm
 SHA1 95f1a9be19e23e09f3c49e7f919dc8bc4d331342 mkparse
-SHA1 38cc69f6fbf11eb5f089b1d2df5f59db1b93fbe4 parser.y
+SHA1 be67c81b472493aa0479b427697ce513ab600cdc parser.y
 SHA1 21f7b6e4c4969e5ed7afa5ee33c6e15a362fa690 t/0-signature.t
-SHA1 ae6f8afe5b4050a991616643066ab0ad41442157 t/00prim.t
+SHA1 dfad657052bd13312992a4b331c64418c076a040 t/00prim.t
 SHA1 be18a157f0146d6565ee8d408953fc4fb6b5a277 t/01tag.t
 SHA1 99d1ebf5730490b798bd72101a891098f274c106 t/02seq.t
 SHA1 1f2efdd0eb2c3105fa9004f29a6b48b58a3bb6a2 t/03seqof.t
 SHA1 052881761fe4f75b21be7d4f053e0b5ca7c3bf49 t/04opt.t
 SHA1 6ea952799c1f8e5fca2c56a87b8c75d4c1c3c2af t/05time.t
-SHA1 8c55761d199e5688310f63672a87d42ba7cb1c0b t/06bigint.t
+SHA1 3eb1f4fddf2a2ed424e5efc833e258241b1340ca t/06bigint.t
 SHA1 eb66af2adefb38a4f3ba05374007a9fa6179c368 t/07input.dat
 SHA1 6ec4a7f978fab3e0e9afeb4a5ad23f8071994491 t/07io.t
 SHA1 7dd7bb7e54ae35e3cc1ae324c5a796aac37a98e1 t/08set.t
@@ -61,9 +61,9 @@ SHA1 a6668ec882a88fcf18f16c0e45db93c358dbb764 t/13utf8.t
 SHA1 e9a541ef9ffbd371f98e17408bb3f73a434e1aaf t/14any.t
 SHA1 c257f48ed7004f7e28e4583336e7b6c6b78c3325 t/funcs.pl
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.4 (Darwin)
+Version: GnuPG v1.2.7 (GNU/Linux)
 
-iD8DBQFCZFUrR0BL4gbYw3QRAmJNAJ9UR0vUs8j2JOvN7/msC/fN0b9u9QCfZCAG
-9xVCvGLem7U/mtLYbiTRBpM=
-=2xXy
+iD8DBQFD+7axR0BL4gbYw3QRAul2AJ0dosq084b69z9bdKlJPAIYSFPfGACdGAnY
+TxpFKe/n61XeWmbH22y4Ks0=
+=Dmm3
 -----END PGP SIGNATURE-----
@@ -1,10 +1,7 @@
-#line 1 "inc/Module/Install/Base.pm - /Users/gbarr/Library/Perl/Module/Install/Base.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Base.pm $ $Author: autrijus $
-# $Revision: #10 $ $Change: 1847 $ $DateTime: 2003/12/31 23:14:54 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Base.pm - /home/gbarr/perl/Module/Install/Base.pm"
 package Module::Install::Base;
 
-#line 31
+#line 28
 
 sub new {
     my ($class, %args) = @_;
@@ -18,18 +15,18 @@ sub new {
     bless(\%args, $class);
 }
 
-#line 49
+#line 46
 
 sub AUTOLOAD {
     my $self = shift;
     goto &{$self->_top->autoload};
 }
 
-#line 60
+#line 57
 
 sub _top { $_[0]->{_top} }
 
-#line 71
+#line 68
 
 sub admin {
     my $self = shift;
@@ -54,4 +51,4 @@ sub DESTROY {}
 
 __END__
 
-#line 115
+#line 112
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Can.pm - /Users/gbarr/Library/Perl/Module/Install/Can.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Can.pm $ $Author: autrijus $
-# $Revision: #6 $ $Change: 1840 $ $DateTime: 2003/12/28 19:42:02 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Can.pm - /home/gbarr/perl/Module/Install/Can.pm"
 package Module::Install::Can;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 $VERSION = '0.01';
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Fetch.pm - /Users/gbarr/Library/Perl/Module/Install/Fetch.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Fetch.pm $ $Author: autrijus $
-# $Revision: #8 $ $Change: 1374 $ $DateTime: 2003/03/18 11:50:15 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Fetch.pm - /home/gbarr/perl/Module/Install/Fetch.pm"
 package Module::Install::Fetch;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
@@ -1,12 +1,10 @@
-#line 1 "inc/Module/Install/Include.pm - /Users/gbarr/Library/Perl/Module/Install/Include.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Include.pm $ $Author: autrijus $
-# $Revision: #8 $ $Change: 1811 $ $DateTime: 2003/12/14 18:52:33 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Include.pm - /home/gbarr/perl/Module/Install/Include.pm"
 package Module::Install::Include;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
 sub include { +shift->admin->include(@_) };
 sub include_deps { +shift->admin->include_deps(@_) };
 sub auto_include { +shift->admin->auto_include(@_) };
+sub auto_include_deps { +shift->admin->auto_include_deps(@_) };
 
 1;
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Makefile.pm - /Users/gbarr/Library/Perl/Module/Install/Makefile.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Makefile.pm $ $Author: autrijus $
-# $Revision: #53 $ $Change: 1847 $ $DateTime: 2003/12/31 23:14:54 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Makefile.pm - /home/gbarr/perl/Module/Install/Makefile.pm"
 package Module::Install::Makefile;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
@@ -143,4 +140,4 @@ sub postamble {
 
 __END__
 
-#line 276
+#line 273
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Metadata.pm - /Users/gbarr/Library/Perl/Module/Install/Metadata.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Metadata.pm $ $Author: autrijus $
-# $Revision: #32 $ $Change: 1885 $ $DateTime: 2004/03/11 05:55:27 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Metadata.pm - /home/gbarr/perl/Module/Install/Metadata.pm"
 package Module::Install::Metadata;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
@@ -1,7 +1,4 @@
-#line 1 "inc/Module/Install/Win32.pm - /Users/gbarr/Library/Perl/Module/Install/Win32.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install/Win32.pm $ $Author: autrijus $
-# $Revision: #9 $ $Change: 1789 $ $DateTime: 2003/11/11 01:22:54 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install/Win32.pm - /home/gbarr/perl/Module/Install/Win32.pm"
 package Module::Install::Win32;
 use Module::Install::Base; @ISA = qw(Module::Install::Base);
 
@@ -1,9 +1,6 @@
-#line 1 "inc/Module/Install.pm - /Users/gbarr/Library/Perl/Module/Install.pm"
-# $File: //depot/cpan/Module-Install/lib/Module/Install.pm $ $Author: autrijus $
-# $Revision: #67 $ $Change: 1885 $ $DateTime: 2004/03/11 05:55:27 $ vim: expandtab shiftwidth=4
-
+#line 1 "inc/Module/Install.pm - /home/gbarr/perl/Module/Install.pm"
 package Module::Install;
-$VERSION = '0.33';
+$VERSION = '0.37';
 
 die << "." unless $INC{join('/', inc => split(/::/, __PACKAGE__)).'.pm'};
 Please invoke ${\__PACKAGE__} with:
@@ -22,6 +19,7 @@ use File::Find ();
 use File::Path ();
 
 @inc::Module::Install::ISA = 'Module::Install';
+*inc::Module::Install::VERSION = *VERSION;
 
 #line 129
 
@@ -168,4 +166,4 @@ sub find_extensions {
 
 __END__
 
-#line 614
+#line 617
@@ -1,4 +1,4 @@
-#line 1 "inc/Test/Builder.pm - /System/Library/Perl/5.8.1/Test/Builder.pm"
+#line 1 "inc/Test/Builder.pm - /usr/lib/perl5/5.8.5/Test/Builder.pm"
 package Test::Builder;
 
 use 5.004;
@@ -1,4 +1,4 @@
-#line 1 "inc/Test/More.pm - /System/Library/Perl/5.8.1/Test/More.pm"
+#line 1 "inc/Test/More.pm - /usr/lib/perl5/5.8.5/Test/More.pm"
 package Test::More;
 
 use 5.004;
@@ -1,11 +1,9 @@
-# Copyright (c) 2000-2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# Copyright (c) 2000-2005 Graham Barr <gbarr@pobox.com>. All rights reserved.
 # This program is free software; you can redistribute it and/or
 # modify it under the same terms as Perl itself.
 
 package Convert::ASN1;
 
-# $Id: Debug.pm,v 1.8 2003/05/06 14:17:43 gbarr Exp $
-
 ##
 ## just for debug :-)
 ##
@@ -1,11 +1,9 @@
-# Copyright (c) 2000-2004 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# Copyright (c) 2000-2005 Graham Barr <gbarr@pobox.com>. All rights reserved.
 # This program is free software; you can redistribute it and/or
 # modify it under the same terms as Perl itself.
 
 package Convert::ASN1;
 
-# $Id: IO.pm 87 2005-03-04 02:03:40Z gbarr $
-
 use strict;
 use Socket;
 
@@ -1,16 +1,12 @@
-# Copyright (c) 2000-2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# Copyright (c) 2000-2005 Graham Barr <gbarr@pobox.com>. All rights reserved.
 # This program is free software; you can redistribute it and/or
 # modify it under the same terms as Perl itself.
 
 package Convert::ASN1;
 
-# $Id: _decode.pm,v 1.18 2003/05/07 09:26:36 gbarr Exp $
-
 BEGIN {
-  unless (CHECK_UTF8) {
-    local $SIG{__DIE__};
-    eval { require bytes } and 'bytes'->import
-  }
+  local $SIG{__DIE__};
+  eval { require bytes and 'bytes'->import };
 }
 
 # These are the subs that do the decode, they are called with
@@ -508,7 +504,7 @@ sub _dec_time {
 
   my $mode = $_dec_time_opt{$_[0]->{'decode_time'} || ''} || 0;
 
-  if ($mode == 2) {
+  if ($mode == 2 or $_[6] == 0) {
     $_[3] = substr($_[4],$_[5],$_[6]);
     return;
   }
@@ -1,11 +1,9 @@
-# Copyright (c) 2000-2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# Copyright (c) 2000-2005 Graham Barr <gbarr@pobox.com>. All rights reserved.
 # This program is free software; you can redistribute it and/or
 # modify it under the same terms as Perl itself.
 
 package Convert::ASN1;
 
-# $Id: _encode.pm,v 1.19 2003/10/08 12:28:09 gbarr Exp $
-
 BEGIN {
   unless (CHECK_UTF8) {
     local $SIG{__DIE__};
@@ -116,7 +114,7 @@ sub _enc_bitstring {
 
   if (ref($_[3])) {
     my $less = (8 - ($_[3]->[1] & 7)) & 7;
-    my $len = ($_[3]->[1] + 7)/8;
+    my $len = ($_[3]->[1] + 7) >> 3;
     $_[4] .= asn_encode_length(1+$len);
     $_[4] .= chr($less);
     $_[4] .= substr($$vref, 0, $len);
@@ -398,7 +396,7 @@ sub _enc_choice {
 sub _enc_bcd {
 # 0      1    2       3     4     5      6
 # $optn, $op, $stash, $var, $buf, $loop, $path
-  my $str = sprintf("%d",$_[3]);
+  my $str = ("$_[3]" =~ /^(\d+)/) ? $1 : "";
   $str .= "F" if length($str) & 1;
   $_[4] .= asn_encode_length(length($str) / 2);
   $_[4] .= pack("H*", $str);
@@ -3,14 +3,12 @@
 
 # 22 "parser.y"
 
-;# Copyright (c) 2000-2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
+;# Copyright (c) 2000-2005 Graham Barr <gbarr@pobox.com>. All rights reserved.
 ;# This program is free software; you can redistribute it and/or
 ;# modify it under the same terms as Perl itself.
 
 package Convert::ASN1::parser;
 
-;# $Id: parser.pm,v 1.12 2003/05/07 15:13:28 gbarr Exp $
-
 use strict;
 use Convert::ASN1 qw(:all);
 use vars qw(
@@ -14,6 +14,8 @@ use Exporter;
 use constant CHECK_UTF8 => $] > 5.007;
 
 BEGIN {
+  local $SIG{__DIE__};
+  eval { require bytes and 'bytes'->import };
 
   if (CHECK_UTF8) {
     require Encode;
@@ -21,7 +23,7 @@ BEGIN {
   }
 
   @ISA = qw(Exporter);
-  $VERSION = "0.19";
+  $VERSION = "0.20";
 
   %EXPORT_TAGS = (
     io    => [qw(asn_recv asn_send asn_read asn_write asn_get asn_ready)],
@@ -1,6 +1,6 @@
 =head1 NAME
 
-  Convert::ASN1 - ASN.1 Encode/Decode library
+Convert::ASN1 - ASN.1 Encode/Decode library
 
 =head1 SYNOPSYS
 
@@ -436,7 +436,7 @@ Graham Barr <gbarr@pobox.com>, Report bugs via <bug-Convert-ASN1@rt.cpan.org>
 
 =head1 COPYRIGHT
 
-Copyright (c) 2000-2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
+Copyright (c) 2000-2005 Graham Barr <gbarr@pobox.com>. All rights reserved.
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
 
@@ -20,14 +20,12 @@
 %token BY 20
 
 %{
-# Copyright (c) 2000-2002 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# Copyright (c) 2000-2005 Graham Barr <gbarr@pobox.com>. All rights reserved.
 # This program is free software; you can redistribute it and/or
 # modify it under the same terms as Perl itself.
 
 package Convert::ASN1::parser;
 
-;# $Id: parser.y,v 1.11 2003/05/07 15:13:27 gbarr Exp $
-
 use strict;
 use Convert::ASN1 qw(:all);
 use vars qw(
@@ -6,7 +6,7 @@
 
 use Convert::ASN1 qw(:all);
 
-print "1..166\n";
+print "1..182\n";
 
 BEGIN { require 't/funcs.pl' }
 
@@ -237,8 +237,13 @@ while(($result,$val) = each %ROID) {
 ##
 
 my %BCD = (
+  pack("C*", 0x04, 0x09, 0x12, 0x34, 0x56, 0x78, 0x91, 0x23, 0x45, 0x67, 0x89), "123456789123456789",
   pack("C*", 0x04, 0x04, 0x12, 0x34, 0x56, 0x78), 12345678,
   pack("C*", 0x04, 0x02, 0x56, 0x4f),             564,
+  pack("C*", 0x04, 0x00),             "",
+  pack("C*", 0x04, 0x00),             -1,
+  pack("C*", 0x04, 0x01, 0x0f),             0,
+  pack("C*", 0x04, 0x01, 0x2f),             2.2,
 );
 
 
@@ -248,6 +253,7 @@ while(($result,$val) = each %BCD) {
   btest $test++, $asn->prepare('bcd BCDString') or warn $asn->error;
   stest $test++, $result, $asn->encode(bcd => $val) or warn $asn->error;
   btest $test++, $ret = $asn->decode($result) or warn $asn->error;
+  $val =~ s/\D.*//;
   stest $test++, $val, $ret->{'bcd'};
 }
 
@@ -9,7 +9,7 @@ BEGIN { require 't/funcs.pl' }
 
 $^W=0 if $] < 5.005; # BigInt in 5.004 has undef issues
 
-print "1..59\n";
+print "1..67\n";
 
 btest 1, $asn = Convert::ASN1->new or warn $asn->error;
 btest 2, $asn->prepare(q(
@@ -107,3 +107,18 @@ while(($result,$val) = each %INTEGER) {
 
 }
 
+my %BCD = (
+  pack("C*", 0x04, 0x05, 0x10, 0x73, 0x74, 0x18, 0x24),	     2**30,
+  pack("C*", 0x04, 0x00),	     -2**30,
+);
+
+while(($result,$val) = each %BCD) {
+  print "# BCDString $val\n";
+
+  btest $test++, $asn->prepare('bcd BCDString') or warn $asn->error;
+  stest $test++, $result, $asn->encode(bcd => $val) or warn $asn->error;
+  btest $test++, $ret = $asn->decode($result) or warn $asn->error;
+  $val =~ s/\D.*//;
+  stest $test++, $val, $ret->{'bcd'};
+}
+