Date: | Mon, 22 Jul 2002 12:26:43 +1000 |
From: | Duncan Sargeant <dunc-mail-1317DF2 [...] rcpt.to> |
To: | Graham Barr <gbarr [...] pobox.com> |
Subject: | Convert::ASN1 |
Hello Graham,
I've found what I think is a bug in Convert::ASN1. Basically, tagged
choices don't work at all. The problem appears to be at around line
700 of parser.pm in compile_one where the code tries to make all
tagged choices explicit. The following will reproduce the bug:
perl -we 'use Convert::ASN1; use strict; $a = new Convert::ASN1;
$a->prepare ("Foo ::= [0] CHOICE { a [0] NULL }");'
It looks like explicit creates a SEQUENCE, using the string 'SEQUENCE'
in the type, which is then compared as an integer. Normally compile_one
would turn this into opSEQUENCE earlier on, but this is in the middle of
compile_one and it doesn't call itself on this new op first.
I can't work out the fix. It appears that line may not be necessary at
all because it is done earlier on in compile_one, but I can't be sure.
Cheers, and thanks for all the perl modules!
,dunc