> This document describes the changes made to old versions of the `asn1` application.

> ## Asn1 1.2.9.6

> ### Known problems

> - The compiler does not check that an exported name actually exists in the ASN.1 module.
>   Own Id: OTP-3659
> - The compiler does not check that a value referenced by name does exist.
>   Own Id: OTP-3277
> - 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-3304

> ### Fixed errors and malfunctions

> - PER: Trailing zeroes in a BIT STRING declared without named bits should not be removed in the encodings.
>   Own Id: OTP-3830

> ## Asn1 1.2.9.5

> ### Known problems

> Same as for 1.2.9.3.

> ### Fixed errors and malfunctions

> - PER: Constraints are not propagated when types are referring to each other. Example: `TBCD-STRING ::= OCTET STRING LAI ::= TBCD-STRING (SIZE(3))` The size constraint is not passed on during encode,decode resulting in wrong encoding for PER , it is coded with a length determinant which should not be there when the length is fixed. For BER this does not matter because the constraints does not affect the encodings.
>   Own Id: OTP-3713
> - The generated code gets wrong if there are several ENUMERATED fields in a SEQUENCE or SET, this is now corrected.
>   Own Id: OTP-3796
> - BER:Decode of a type T ::= SEQUENCE OF C fails if C is encoded with indefinite length. This is know corrected.
>   Own Id: OTP-3811

> ## Asn1 1.2.9.3

> ### Known problems

> - The compiler does not check that an exported name actually exists in the ASN.1 module.
>   Own Id: OTP-3659
> - The compiler does not check that a value referenced by name does exist.
>   Own Id: OTP-3277
> - 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-3304

> ### Fixed errors and malfunctions

> - This version supports soft upgrade from versions 1.2.6 1.2.7.
> - In an ENUMERATED type like this:
>   T ::= ENUMERATED { blue, green}
>   The symbols was encoded/decoded with the wrong values, i.e in reverse order. This is now corrected.
>   Own Id: OTP-3700
> - PER: OCTET STRING with Size constrained to a single value i.e fixed size was treated wrong during encode and decode. This is now corrected.
>   Own Id: OTP-3701

> ### Improvements and new features

> - There is now a new compiler option `ber_bin` available that can be used to generate encode/decode functions for BER that uses the new "bit-syntax" to make the functions more efficient. The `ber_bin` option is used as an alternative to the `ber` and `per` options.

>   The encode function then produces a possibly nested list of binaries and integer lists. The decode function does in this case require a single binary as input instead of a list. The modules generated with this option require that you have an R7A or later system, otherwise they will not compile and the runtime module asn1rt_ber_bin can not be executed.

>   The ber_bin option is not officially supported in this version (will be in a later version) but is provided for those who want to try it. It should be significantly faster at decode and is slightly faster at encode. Exactly how performance differs between this binary approach and the list approach depends highly on the type of input. Another thing worth noting is that both approaches still have a lot of solutions in common which can be improved a lot to gain even better performance.

> ## Asn1 1.2.9.2

> ### Fixed errors and malfunctions

> - BER: Encode/decode of extension components did not work properly. This is now corrected.
>   Own Id: OTP-3395
>   Aux Id: PER:The encode/decode of NULL as an open type has been corrected. An open type must always have a length of at least 1 byte even if the contained value (e.g NULL) encodes to nothing.
>   Own Id: OTP-3496
>   Aux Id:
> - 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. This is now corrected.
>   Own Id: OTP-3278

> ### Improvements and new features

> - The ASN.1 language feature `COMPONENTS OF` is now implemented.
>   Own Id: OTP-2515
> - The encoding and decoding of ENUMERATED and INTEGER with NamedNumbers is made more efficient and thus faster in runtime.
>   Own Id: OTP-3464
>   Aux Id:
> - Added support for encode/decode of open type which is constrained to a specific type. Previously the value of an open type had to be a list of octets, but now the Erlang representation of the specific type used in the constraint is used both as input to encode and as output from decode.
>   Own Id: OTP-3569
>   Aux Id:
> - PER: GeneralString, GraphicalString etc. i.e all strings that are not so called "known-multiplier character string types" are now supported by the runtime encode/decode functions.
>   Own Id: OTP-3573
>   Aux Id:

> ## 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-3304

> ### Fixed 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` and `asn1rt_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 4100

> ## Asn1 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` and `SET 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}` where `Value` is an integer. Enumerated values in this format are also accepted by the encoder. ASN.1 modules containing `ENUMERATED` 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 that `OBJECT 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-3306

> ### Improvements 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}` where `Value` 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-3326

> ## 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}` where `Value` is an integer. Enumerated values in this format are also accepted by the encoder. ASN.1 modules containing `ENUMERATED` 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

> ## Asn1 1.1.1

> ### Known problems

> - The syntactic construct `COMPONENTS OF` is not implemented.
>   Own Id: OTP-2515
> - `ANY` and `ANY 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-3105

> ## Asn1 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-3241

> ### Fixed 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` and `asn1ct: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}` where `Value` is an integer. Enumerated values in this format are also accepted by the encoder. ASN.1 modules containing `ENUMERATED` 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-3059

> ### Improvements 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-2806

> ## Asn1 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-2666

> ### Improvements 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-1845

> ## R3B02 (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-2349

> ## R3A (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-1848

> ## 1 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` and `ANY DEFINED BY` (is not in the standard any more).
> - NOT SUPPORTED types `EXTERNAL` and `EMBEDDED-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:
>   - SizeConstraint SIZE(X)
>   - SingleValue (1)
>   - ValueRange (X..Y)
>   - PermittedAlpabet FROM (but not for BMPString and UniversalString when generating PER).
>   Complex expressions in constraints is not supported (planned to be extended).
> - 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.

Copyright © 1991-99 Ericsson Utvecklings AB