This document describes the changes made to old versions of the
asn1
application.Asn1 1.2.6
Known problems
- The ASN.1 language feature
COMPONENTS OF
is not implemented.
Own Id: OTP-2515- The compiler does not check that a value referenced by name does exist.
Own Id: OTP-3277- BER:In the current implementation extension components of a SEQUENCE are required to be present when they are specified as mandatory. This is an error, all extension components are "optional" even if they are not specified to have the OPTIONAL or DEFAULT property.
Own Id: OTP-3278- BER: The compiler does not take the extensions into account when checking if the tags are unique in a SEQUENCE or SET.
Own Id: OTP-3304Fixed errors and malfunctions
- This version supports soft upgrade from versions 1.1.1, 1.1.5 and 1.1.6. Two new runtime modules
asn1rt_ber_v1
andasn1rt_per_v1
are delivered together with the old ones. This makes it possible to continue running applications with modules generated with the previous version of the asn1 compiler while modules generated by this version will use the new runtime modules. Note that it is only advice-able to continue running old generates if they are working perfectly and have no need for the corrections made in this version of the asn1 application.- BER: SEQUENCEs encoded with indefinite length was not correctly decoded. This in now corrected.
Own Id: OTP-3352
Aux Id: Seq 4100Asn1 1.2.4
Fixed errors and malfunctions
- The compiler now detects multiple definitions of values and types and reports this as an error. Previously this was detected when the generated Erlang module was compiled.
Own Id: OTP-3105- BER: An error regarding encoding of
ENUMERATED
present in asn1-1.1.1 is corrected. The new version 1.1.2 of asn1 containing this correction is delivered as a "patch".
Own Id: OTP-3169- BER: Decoding of
SEQUENCE OF
andSET OF
with indefinite length is corrected. The correction was first delivered in version 1.1.2.
Own Id: OTP-3170- BER: Encoding and decoding of
ENUMERATED
with extensionmark "..." did not work (crashed with a runtime error). This has now been corrected. If an unknown enumerated value is decoded (for an extensible enumerated type) it is returned as{asn1_enum,Value}
whereValue
is an integer. Enumerated values in this format are also accepted by the encoder. ASN.1 modules containingENUMERATED
with extensionmark should be recompiled with the corrected version of the compiler. The BER runtime functions are also corrected. Note that this correction has already been delivered as a bugfix for R4B (OTP-2951).
Own Id: OTP-3202
Aux Id: Seq3745- BER: The primitive/constructed bit in the tag byte of an encoding is not correct when it comes to user defined tags. For example in
T ::= [2] SEQUENCE { a BOOLEAN}
the tag 2 does not get the constructed bit set which it should. This is now corrected.
Own Id: OTP-3241- The decoder can now detect if there are unexpected bytes remaining when all components of a sequence are decoded. The decoder will then return
{error,{asn1{unexpected,Bytes}}}
Own Id: OTP-3270- Values of type
OBJECT IDENTIFIER
was sometimes returned as an Erlang list (ASN.1 constants) and sometimes as a tuple (from the decode functions). This is now changed so thatOBJECT IDENTIFIER
values always are represented as an Erlang tuple.
Own Id: OTP-3280- PER:The encode/decode functions could not handle integers with a range greater than 16#7ffffff. This limit is now removed.
Own Id: OTP-3287- PER: The encoding/decoding of the length for a SET OF/SEQUENCE OF was wrong if there was a size constraint. This is now corrected.
Own Id: OTP-3291- PER: Encoding of a constrained INTEGER (range > 16 k) was wrong for the value 0. This is now corrected.
Own Id: OTP-3306Improvements and new features
- The ASN.1 module name and the filename where the ASN.1 specification resides must match each other (has always been the case). This is now checked by the compiler. The check requires that the names match in a case or case insensitive way depending on the characteristics for the current system.
Own Id: OTP-1843- PER: Encode/decode of an extension value (i.e not within the root set) for
ENUMERATED
did not work properly. This is now corrected. If an unknown enumerated value is decoded (for an extensible enumerated type) it is returned as{asn1_enum,Value}
whereValue
is an integer. Enumerated values in this format are also accepted by the encoder (if the value is >= the number of known extension values).
Own Id: OTP-2930- Unnecessary printouts from the compiler are removed. The compiler version and the compiler options are now printed to stdout.
Own Id: OTP-3276- In order to better suite the use of ASN.1 in embedded systems only the modules needed in runtime are now listed in the
.app
file.
Own Id: OTP-3279- The compiler now supports extensionmarker in constraint specifications. Example:
INTEGER (0..10, ...)
In previous version this was reported as a syntax error.
Own Id: OTP-3281- A very limited part of ITU-T recommendation X.681 Abstract Syntax Notation One (ASN.1): Information object specification is now implemented. Specifically TYPE IDENTIFIER is reqognized by the compiler.
Own Id: OTP-3325- Parameterization of ASN.1 specifications (ITU-T X.683) is now supported to a limited extent.
Own Id: OTP-3326Asn1 1.1.3.1
Fixed errors and malfunctions
- BER Encoding and decoding of
ENUMERATED
with extensionmark "..." did not work (crashed with a runtime error). This has now been corrected. If an unknown enumerated value is decoded (for an extensible enumerated type) it is returned as{asn1_enum,Value}
whereValue
is an integer. Enumerated values in this format are also accepted by the encoder. ASN.1 modules containingENUMERATED
with extensionmark should be recompiled with the corrected version of the compiler. The BER runtime functions are also corrected. Note that this correction has already been delivered as a bugfix for R4B (OTP-2951).
Own Id: OTP-3202
Aux Id: Seq3745Asn1 1.1.1
Known problems
- The syntactic construct
COMPONENTS OF
is not implemented.
Own Id: OTP-2515ANY
andANY DEFINED BY
are currently not supported.
Own Id: OTP-2741
Aux Id: seq 1188- Multiple definitions of the same Type or Value is not detected by the compiler. The error occurs when the generated Erlang module is compiled.
Own Id: OTP-3105Asn1 1.1
Known problems
- The primitive/constructed bit in the tag byte of an encoding is not correct when it comes to user defined tags. For example in
T ::= [2] SEQUENCE { a BOOLEAN}
the tag 2 does not get the constructed bit set which it should. This is now corrected.
Own Id: OTP-3241Fixed errors and malfunctions
- The BER decoder failed to decode certain nested data types where
IMPLICIT
tags where involved. This is now corrected.
Own Id: OTP-2719
Aux Id: seq 1148- The handling of types with extension marker "..." is corrected. Earlier each SEQUENCE and SET with an extension marker got an extra field named
asn1_EXT
in the generated record. This was a mistake and that field is now removed (conserns both BER and BER).
Own Id: OTP-2724
Aux Id: seq 1148, OTP-2719- The decoder (both BER and PER) could not handle unnamed bits of a
BIT STRING
if the type had any named bits declared. This is now corrected and the unnamed bits are returned as{bit,Pos}
where Pos is the bit position. The{bit,Pos}
can be used as input to the encoder too.
Own Id: OTP-2725
Aux Id: seq 1148,OTP-2719,OTP-2724- The functions
asn1rt:decode
andasn1ct:decode
did not always return{ok,Result}
or{error,Reason}
as documented. This is now corrected.
Own Id: OTP-2730
Aux Id: seq 1158- The compiler did not accept CHOICE types as components of a SEQUENCE or SET when the modules tag default was IMPLICIT. Example:
C ::= CHOICE { ......} A ::= SEQUENCE { a [1] C, -- This was not accepted .....
This was an error caused by a misinterpretation of the ASN.1 standard. This is now corrected.
Own Id: OTP-2731
Aux Id: seq 1163- When decoding a SEQUENCE A which contains an OPTIONAL component b which is a SEQUENCE with mandatory components, the decoder does not detect as an error that a mandatory component of b is missing. The same error could occur also in other cases with nested types and optional components of SEQUENCE or SET. This is now corrected.
Own Id: OTP-2738
Aux Id: seq 1183- BER Encoding and decoding of
ENUMERATED
with extensionmark "..." did not work (crashed with a runtime error). This has now been corrected. If an unknown enumerated value is decoded (for an extensible enumerated type) it is returned as{asn1_enum,Value}
whereValue
is an integer. Enumerated values in this format are also accepted by the encoder. ASN.1 modules containingENUMERATED
with extensionmark should be recompiled with the corrected version of the compiler. The BER runtime functions are also corrected.
Own Id: OTP-2951
Aux Id: Seq 1446 OTP-2929- The compiler does now accept all valid value notations for the OBJECT IDENTIFIER type. The generated code for those values is also corrected.
Own Id: OTP-3059Improvements and new features
- The code generated for BER is significantly enhanced resulting in less code and around 300% better performance in runtime for the encoding of complex ASN.1 values. The performance of decoding is unchanged.
Own Id: OTP-2806Asn1 1.0.3
Fixed errors and malfunctions
- The
asn1.app
file is corrected.
Own Id: OTP-2640- The encoding of integers in BER did not comply with the standard for all values. The values was not encoded in the minimum number of octets as required. This is now corrected in the runtime module
asn1rt_ber
.
Own Id: OTP-2666Improvements and new features
- The compiler now generates explicit exports directives for all generated functions that should be exported (instead of -compile(export_all)). This eliminates the warnings from the Erlang compiler when compiling the generated file.
Own Id: OTP-1845R3B02 (Asn1 1.0.2)
Fixed errors and malfunctions
- The decoding of a BER encoded SEQUENCE with optional component of type SEQUENCE (also with optional components) could result in an error or wrong result if the tags are equal.
Own Id: OTP-2226- The encoding of (PER) SEQUENCE with extensionmark was wrong. This is now corrected.
Own Id: OTP-2349R3A (Asn1 0.9)
Fixed errors and malfunctions
- The asn1 compiler now detects the use of an implicit tag before
CHOICE
as an error (in accordance with the standard)
Own Id: OTP-1844- An OPTIONAL CHOICE embedded in SEQUENCE when BER coding caused an error when generating decode code. This is now corrected.
Own Id: OTP-1857
Aux Id: OTP-18481 ASN1 0.8.1
This is the first release of the ASN1 application. This version is released for beta-testing. Some functionality will be added until the 1.0 version is released. See the release notes for the latest version for the exact details about new features. A list of missing features and restrictions can be found in the chapter below.
1.1 Missing features and other restrictions
- The encoding rules BER and PER (aligned) is supported. PER (unaligned) IS NOT SUPPORTED.
- NOT SUPPORTED types
ANY
andANY DEFINED BY
(is not in the standard any more).
- NOT SUPPORTED types
EXTERNAL
andEMBEDDED-PDV
.
- NOT SUPPORTED type
REAL
(planned to be implemented).
- The code generation support for value definitions in the ASN.1 notation is very limited (planned to be enhanced).
- The support for constraints is limited to:
Complex expressions in constraints is not supported (planned to be extended).
- SizeConstraint SIZE(X)
- SingleValue (1)
- ValueRange (X..Y)
- PermittedAlpabet FROM (but not for BMPString and UniversalString when generating PER).
- The current version of the compiler has very limited error checking:
- Stops at first syntax error.
- Does not stop when a reference to an undefined type is found , but prints an error message. Compilation of the generated Erlang module will then fail.
- A whole number of other semantical controls is currently missing. This means that the compiler will give little or bad help to detect what's wrong with an ASN.1 specification, but will mostly work very well when the ASN.1 specification is correct.
- The maximum INTEGER supported in this version is a signed 64 bit integer. This limitation is probably quite reasonable. (Planned to be extended).
- Only AUTOMATIC TAGS supported for PER.
- Only EXPLICIT and IMPLICIT TAGS supported for BER.
- The compiler supports decoding of BER-data with indefinite length but it is not possible to produce data with indefinite length with the encoder.