This document describes the changes made to old versions of the
asn1
application.Asn1 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.