Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Convert-ASN1 CPAN distribution.

Report information
The Basics
Id: 1311
Status: resolved
Priority: 0/
Queue: Convert-ASN1

People
Owner: Nobody in particular
Requestors: dunc-mail-1317DF2 [...] rcpt.to
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Date: Mon, 22 Jul 2002 06:00:04 +0100
From: Graham Barr <gbarr [...] pobox.com>
To: Duncan Sargeant via RT <bug-Convert-ASN1 [...] rt.cpan.org>
Cc: 'AdminCc of cpan Ticket #1311': ;
Subject: Re: [cpan #1311] Convert::ASN1
Ah, I had a thought (which can be dangerous) the problem was not only that explicit was being called too late, but that compile_one was processing this op twice. Try the attached patch Graham.

Message body is not shown because sender requested not to inline it.

Thanks. Something at the back of my mind is bugging me that that is not the right solution. But until that materializes into some real, I will apply your patch.