help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

X.680 12.1: empty DefinitiveIdentifier case?


From: Ivan Shmakov
Subject: X.680 12.1: empty DefinitiveIdentifier case?
Date: Tue, 09 Oct 2012 01:40:30 +0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

        X.680 reads (ยง12.1):

ModuleIdentifier ::=
    modulereference
    DefinitiveIdentifier

DefinitiveIdentifier ::=
    "{" DefinitiveObjIdComponentList "}"
  | empty

        Thus, I'd assume that the following ASN.1 definition (with
        DefinitiveIdentifier = empty) is perfectly valid:

$ cat < asn.1 
Example DEFINITIONS EXPLICIT TAGS ::=

BEGIN

Foo ::= CHOICE {
    bar     INTEGER,
    baz     GeneralString
}

END
$ 

        Unfortunately, it doesn't seem to be accepted by asn1Coding(1)
        (and preasumably by the underlying library, too):

$ asn1Coding -o /dev/null asn.1 \
      <(printf %s\\n 'x Example.Foo' "'' baz" 'baz 42') 
asn1Coding: asn.1:1: parse error near 'DEFINITIONS'
$ 

        Could this issue please be rectified?  (My guess is that it's
        the definitions_id rule in lib/ASN1.y that has to be amended,
        though my Bison skills are too weak to suggest a specific
        change.)

        TIA.

-- 
FSF associate member #7257




reply via email to

[Prev in Thread] Current Thread [Next in Thread]