ASN.1 question

Bertil Karlsson bertil.karlsson@REDACTED
Wed Oct 3 10:43:51 CEST 2001


I don't know which version of the ASN.1 compiler you are using, so I
don't know how your compilation failed. 
The support of Information Objects (X.681) is new since version 1.3 of
the compiler. Then we
supported that functionality for PER encoding only. The R8 release
contains a new asn1 compiler, asn1-1.3.2, which supports X.681 also for
BER encoding.
However, your ASN.1 code will not work anyhow, because you discovered
one shortcomming of the compiler and one bug. The bug is corrected in
the new version of the compiler.
The shortcoming is that the expression in the constraint
"bound.&minTimeAndTimezoneLength .. bound.&maxTimeAndTimezoneLength"
uses the ASN.1 item ValueFromObject, which we yet have not handled in
the parser in the way it appears in your example.

If you are going to use R8, you can change the constraint mentioned
above and it will work.

/Bertil Karlsson

"Pedro Jeria (ERV)" wrote:
> Hi,
> I'm trying to compile one ASN.1 module (with asn1ct BER) but it seems that OTP does not handle the ASN.1 type 'CLASS' correctly. Therefore I have a question: How can I redesign for ex. the following code so it would compile:
> TimeAndTimezone {PARAMETERS-BOUND : bound}::= OCTET STRING (SIZE(
>         bound.&minTimeAndTimezoneLength .. bound.&maxTimeAndTimezoneLength))
> {
>         &minTimeAndTimezoneLength                       INTEGER,
>         &maxTimeAndTimezoneLength                       INTEGER
> }
> {
>         MINIMUM-FOR-TIME-AND-TIMEZONE                   &minTimeAndTimezoneLength
>         MAXIMUM-FOR-TIME-AND-TIMEZONE                   &maxTimeAndTimezoneLength
> }
> capSpecificBoundSet PARAMETERS-BOUND ::=
> {
>         MINIMUM-FOR-TIME-AND-TIMEZONE                  8
>         MAXIMUM-FOR-TIME-AND-TIMEZONE                  8
> }
> Thanks
> /Pedro

More information about the erlang-questions mailing list