1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
9
<holder>Ericsson AB, All Rights Reserved</holder>
12
The contents of this file are subject to the Erlang Public License,
13
Version 1.1, (the "License"); you may not use this file except in
14
compliance with the License. You should have received a copy of the
15
Erlang Public License along with this software. If not, it can be
16
retrieved online at http://www.erlang.org/.
18
Software distributed under the License is distributed on an "AS IS"
19
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20
the License for the specific language governing rights and limitations
23
The Initial Developer of the Original Code is Ericsson AB.
26
<title>ASN1 Release Notes</title>
27
<prepared>Bertil Karlsson</prepared>
28
<responsible></responsible>
34
<file>notes_history.sgml</file>
36
<p>This document describes the changes made to the asn1 system
37
from version to version. The intention of this document is to
38
list all incompatibilities as well as all enhancements and
39
bugfixes for every release of the asn1 application. Each release of asn1
40
thus constitutes one section in this document. The title of each
41
section is the version number of asn1.</p>
44
<title>Asn1 1.4.3.1</title>
47
<title>Fixed Bugs and Malfunctions</title>
48
<list type="bulleted">
50
<p>The <c>{internal_error,...,{ unrecognized_type,...}}</c>
51
error occuring for a SET type when compiling with options
52
<c>[ber_bin,optimize,der]</c> is now corrected.</p>
53
<p>Own Id: OTP-4866</p>
56
<p>False encode of BIT STRING in PER (per_bin,optimize) is fixed. The error occured when there was a type like BIT STRING (SIZE(C)) and C > 16.</p>
57
<p>Own Id: OTP-4869</p>
64
<title>Asn1 1.4.3</title>
67
<title>Fixed errors and malfunctions</title>
68
<list type="bulleted">
70
<p>Functionality to handle parameterized object sets have been added.</p>
71
<p>Own Id: OTP-4832</p>
74
<p>Bug causing duplicated fuction definitions using exclusive decode is removed.</p>
75
<p>Own Id: OTP-4833)</p>
78
<p>The race condition when loading asn1 driver is solved.</p>
79
<p>Own Id: OTP-4835</p>
85
<title>Improvements and new features</title>
86
<list type="bulleted">
88
<p>A specialized decode, <em>selective decode</em> is now available. It decodes a chosen internal sub-type of a constructed type.</p>
89
<p>Own Id: OTP-4856)</p>
96
<title>Asn1 1.4.2.2</title>
99
<title>Fixed errors and malfunctions</title>
100
<list type="bulleted">
102
<p>Release of Asn1 1.4.2.1 on R7B, The functionality is the same, but
103
the layer between the driver and the asn1 erlang code is different.</p>
110
<title>Asn1 1.4.2.1</title>
113
<title>Fixed errors and malfunctions</title>
114
<list type="bulleted">
116
<p>ObjectDescriptor does now work as part of a sequence, set or choice.</p>
117
<p>Own Id: OTP-4773</p>
120
<p>When a SEQUENCE that have extension mark was decoded inside a
121
SEQUENCE OF it could cause decode error due to a failure in
122
restbytes2. It is now corrected.</p>
123
<p>Own Id: OTP-4791)</p>
126
<p>Now the bug is fixed that caused the compiler crash on an untaged
127
optional open type.</p>
128
<p>Own Id: OTP-4792</p>
131
<p>The earlier exit caused by bad indata is now fixed so it will
132
rreturn an {error,Reason} tuple.</p>
133
<p>Own Id: OTP-4797</p>
136
<p>Open type encoded with indefinite length is now correct decoded.</p>
137
<p>Own Id: OTP-4798</p>
140
<p>Now is absent optional open types handled correctly.</p>
141
<p>Own Id: OTP-4799</p>
144
<p>Now is the necessary functions available for sorting in run-time of
145
SET and SET OF components.</p>
146
<p>Own Id: OTP-4809</p>
153
<title>Asn1 1.4.2</title>
156
<title>Fixed errors and malfunctions</title>
157
<list type="bulleted">
159
<p>When a component in a SEQUENCE is a CHOICE (or reference to a CHOICE)
160
and the SEQUENCE's component and one of the alternatives in the CHOICE
161
have identical names, an error may occur if one doesn't use the
162
'optimized' versions of the compiler. In the older versions (<c>ber, ber_bin, per, per_bin</c>) one could optionally apply a value of a
163
component as <c>{ComponentName,Value}</c>, and the generated code
164
chooses the second element of the tuple. However, a value of a CHOICE
165
must be applied as a tuple: <c>{AlternativeName,Value}</c>. Thus,
166
in the rare case described above and if the value to the SEQUENCE's
167
component is not in a tuple notation the
168
<c>{AlternativeName,Value}</c> will be peeled off in the SEQUENCE
169
and the value fed to the CHOICE will only be the <c>Value</c>
170
part of <c>{AlternativeName,Value}</c>, and the encoder crashes.
171
The best way to avoid this is to use the optimized version of the
172
compiler where the unnecessary tuple notation
173
<c>{ComponentName,Value}</c> no longer is allowed. Since it isn't
174
possible to solve this bug in the compiler.</p>
175
<p>Own Id: OTP-4693</p>
181
<title>Improvements and new features</title>
182
<list type="bulleted">
184
<p>Exclusive decode is enabled by a compiler option and a configuration
185
file. It makes it possible to leave parts of an ASN.1 encoded message
187
<p>Own Id: OTP-4744</p>
194
<title>Asn1 1.4.1.1</title>
197
<title>Fixed errors and malfunctions</title>
198
<list type="bulleted">
200
<p>The documentation about how extensibility is handled is now corrected.</p>
201
<p>Own Id: OTP-4663</p>
204
<p>Function in object now calls the exported function</p>
205
<p>Own Id: OTP-4665</p>
208
<p>Now is tags for ObjectClassFieldType analyzed correctly.</p>
209
<p>Own Id: OTP-4666</p>
216
<title>Asn1 1.4.1</title>
219
<title>Fixed errors and malfunctions</title>
220
<list type="bulleted">
222
<p>Now is the Default value for an ENUMERATED returned as the name from
223
the NamedList when decoding.</p>
224
<p>Own Id: OTP-4633</p>
227
<p>It was an internal failure when permitted alphabet constraint existed
228
together with for instance a size constraint. E.g. when a
229
referenced type is constrained by a size constraint and the defined
230
type in turn is constrained by a permitted alphabet constraint.</p>
231
<p>Own Id: OTP-4559</p>
234
<p>Record is generated in hrl file for a CHOICE with extension mark
235
that has an internal SEQUENCE/SET definition.</p>
236
<p>Own Id: OTP-4560</p>
239
<p>Now is the length of a SEQUENCE/SET OF correctly encoded/decoded (PER).</p>
240
<p>Own Id: OTP-4590</p>
243
<p>The problem with unordered decoded terms when a component is a
244
ObjectClassFieldType has been solved.</p>
245
<p>Own Id: OTP-4591</p>
251
<title>Improvements and new features</title>
252
<list type="bulleted">
254
<p>More complex definitions with TableConstraints where the SimpleTable
255
and ComponentRelation are on different levels is now fully
257
<p>Own Id: OTP-4631</p>
264
<title>Asn1 1.4</title>
267
<title>Fixed errors and malfunctions</title>
271
<title>Improvements and new features</title>
272
<list type="bulleted">
274
<p>Each generated .erl file have now a function info/0 that returns
275
information about the used compiler version and options.</p>
276
<p>Own Id: OTP-4373</p>
279
<p>When compiling an ASN.1 module the compiler generates an Erlang module
280
that is compiled by the Erlang compiler. Earlier it was not possible to
281
add options to the final step, the Erlang compilation. By adding any
282
option that is not recognized as a specific ASN.1 option it will be
283
passed to the final step like: <c>erlc +debug_info Mymodule.asn</c> or
284
<c>asn1ct:compile('Mymodule',[debug_info])</c>.</p>
285
<p>Own Id: OTP-4491</p>
288
<p>Earlier one couldn't multi file compile modules that had different
289
tagdefaul, which now is possible. Equal Type/Value names in different
290
modules are resolved by renaming (concatenate type name and module
291
name): If two types with the same name T exist in module A and module B
292
they will get the new names TA and TB.</p>
293
<p>(Own Id: OTP-4492)</p>
294
<p>Aux Id: OTP-3983</p>
297
<p>BER: Encode/decode of data have been significantly improved. By use of
298
the compiler options <c>ber_bin</c> and <c>optimize</c>,
299
optimized code will be generated and the optimized run-time module will
301
<p>Own Id: OTP-4493</p>
308
<title>Asn1 1.3.3.1</title>
311
<title>Fixed errors and malfunctions</title>
312
<list type="bulleted">
314
<p>Proper length encoding and padding implemented for a <c>BIT STRING</c> with
315
NamedNumberList and size constraint as value range. This functionality
316
didn't work in the rare occasion when the NamedNumberList is shorter
317
than the lower bound of the constraint.As in this example:
318
<c>TestS ::= BIT STRING {a (0),b (1)} (SIZE (3..8))</c></p>
319
<p>(Own Id: OTP-4353)</p>
322
<p>Bug in compiler, when an <c>OBJECT IDENTIFIER</c> value consisting of
323
two identifiers (Defined values or Name form identifiers) was falsely
324
interpreted causing a compiling error is now corrected.</p>
325
<p>(Own Id: OTP-4354)</p>
328
<p>Internal error in check phase that caused crash on
329
<c>ObjectClassFieldType</c> in ber_bin is corrected.</p>
330
<p>(Own Id: OTP-4390)</p>
333
<p>Tags for open types are handled according to <c>x.680 30.6c</c>, i.e.
334
open types shall not be tagged <c>IMPLICIT.</c></p>
335
<p>(Own Id: OTP-4395)</p>
336
<p>(Aux Id: OTP-4390)</p>
343
<title>Asn1 1.3.3</title>
346
<title>Fixed errors and malfunctions</title>
347
<list type="bulleted">
349
<p>Now gives the compiler an apropriate error report when exported
350
undefined types are detected.</p>
351
<p>(Own Id: OTP-4129)</p>
354
<p>The type <c>ObjectDescriptor</c> is now supported, previously the
355
implementation of encode/decode for this rarely used type was
357
<p>(Own Id: OTP-4161)</p>
358
<p>(Aux Id: seq7165)</p>
361
<p>In case of per and compact_bit_string the rightmost byte were erronous
362
truncated when the rightmost bits of that byte were zeros. This is now
364
<p>(Own Id: OTP-4200)</p>
367
<p>Bad match of returnvalue from decode_length in skipvalue/3 has now been
369
<p>(Own Id: OTP-4232)</p>
372
<p>Now is decode of ENUMERATED handled correctly, when tagged EXPLICIT.</p>
373
<p>(Own Id: OTP-4234)</p>
376
<p>The compiler now parses and handles the ValueFromObject construct.</p>
377
<p>(Own Id: OTP-4242)</p>
380
<p>Now does the compiler handle the case when the object set in simple
381
table and componentrelation constraints is of a CLASS without a UNIQUE
382
field. In this case is the octets, which is assumed to be encoded,
383
encoded as an open type.</p>
384
<p>(Own Id: OTP-4248)</p>
385
<p>(Aux Id: OTP-4242)</p>
388
<p>Compiler handles objects in AdditionalElementSetSpec in ObjectSetSpec,
389
i.e. the objects that are referred to after the ellipses in an object set.</p>
390
<p>(Own Id: OTP-4275)</p>
393
<p>Now are values with a component of type CHOICE encoded with indefinite
394
length correctly decoded.</p>
395
<p>(Own Id: OTP-4358)</p>
401
<title>Improvements and new features</title>
402
<list type="bulleted">
404
<p>The language constructs (from the old 1988 standard) <c>ANY</c>
405
and <c>ANY DEFINED BY</c> are now implemented.</p>
406
<p>(Own Id: OTP-2741)</p>
407
<p>(Aux Id: seq 1188)</p>
410
<p>Now it is checked in run-time if a <c>OBJECT IDENTIFIER</c> value is unvalid</p>
411
<p>(Own Id: OTP-4235)</p>
414
<p>The ASN.1 types EXTERNAL,EMBEDDED PDV and CHARACTER STRING now have full support in the compiler.</p>
415
<p>(Own Id: OTP-4247)</p>
418
<p>A driver in C does the final job (complete) of the PER encoding when
419
files are compiled with <c>per_bin</c> and <c>optimize</c> flags.
420
It gives significant faster encoding for PER.</p>
421
<p>(Own Id: OTP-4355)</p>
424
<p>Encode and decode of PER encoding has been made faster by moving
425
analysis done in run-time to compile-time. These optimizations are
426
available by compiling ASN.1 files with options <c>per_bin</c> and
428
<p>(Own Id: OTP-4381)</p>
429
<p>(Aux Id: OTP-4355)</p>
436
<title>Asn1 1.3.2</title>
439
<title>Fixed errors and malfunctions</title>
440
<list type="bulleted">
442
<p>Now does the compiler check values (including referenced values), and
443
formats the value so it is suitable to use as input to encoding
445
<p>(Own Id: OTP-3277)</p>
446
<p>(Aux Id: OTP-4103)</p>
449
<p>Unnecessary external function calls in generated code are now generated
450
as internal function calls.</p>
451
<p>(Own Id: OTP-4073)</p>
457
<title>Improvements and new features</title>
458
<list type="bulleted">
460
<p>Now is Information Objects supported in BER encoding.</p>
461
<p>(Own Id: OTP-3980)</p>
462
<p>(Aux Id: OTP-3979 OTP-3978)</p>
466
<p>PER: A new option <c>per_bin</c> is now supported. When used the
467
generated encode/decode functions use binaries and the bit syntax to
468
get better performance than the old <c>per</c> variant which used
469
lists. All values input to encode and returned from decode are
470
compatible between <c>per</c> and <c>per_bin</c> except for
471
open types which are represented as binaries with per_bin and octet
472
lists with per. We recommend that you use per_bin instead of per from
473
now on, the use of binaries will be the default in coming versions and
474
all improvements and optimizations for PER will be concentrated to that
476
<p>(Own Id: OTP-4094)</p>
480
<p>Support for DER implemented. Used by flag +der when compiling. Include
481
the full BER encoding plus: sorting of SET components, sorting of
482
encoded elements in SET OF, full check of default values in SET and
483
SEQUENCE. See new documentation on DER in user_guide sections 1.3.1;
484
1.4.11; 1.4.12; 1.4.14; 1.4.16 and 1.10, in the reference manual for
486
<p>(Own Id: OTP-4103)</p>
494
<title>Asn1 1.3.1</title>
497
<title>Fixed errors and malfunctions</title>
498
<list type="bulleted">
500
<p>Do not generate record in .hrl file for SET types</p>
501
<p>Own Id: OTP-4025</p>
504
<p>Fixed internal error when using BIT STRINGs with Named Number List in combination with <c>compact_bit_string</c> and <c>ber_bin</c> options.</p>
505
<p>Own Id: OTP-4026</p>
506
<p>Aux Id: OTP-3982</p>
509
<p>The atom 'com' can now be used in ENUMERATED as an EnumerationItem.</p>
510
<p>Own Id: OTP-4037</p>
511
<p>Aux Id: Seq 7036</p>
514
<p>ber: Now it is possible (again) to encode data format "{Type,Value}" in a SEQUENCE OF RequestParameter, when RequestParameter is of type ENUMERATED. The {Type,Value}
515
notation is not recommended for use, it is redundant and exist only for very ancient backwards compatibility reasons. The "feature" might be removed in forthcoming versions.</p>
516
<p>Own Id: OTP-4057</p>
517
<p>Aux Id: Seq 7066</p>
520
<p>A bug in the parser, that caused failure on COMPONENTS OF is now removed.</p>
521
<p>Own Id: OTP-4058</p>
528
<title>Asn1 1.3</title>
531
<title>Known problems</title>
532
<list type="bulleted">
534
<p>The compiler will now check that a value referenced by name
536
<p>Own Id: OTP-3277</p>
539
<p>BER:Decode of a type T ::= SEQUENCE OF C fails if C is encoded with indefinite length.
540
This is know corrected.</p>
541
<p>Own Id: OTP-3811</p>
542
<p>Aux Id: seq5040</p>
548
<title>Fixed errors and malfunctions</title>
549
<list type="bulleted">
551
<p>The new parser handles imports when one import ends with FROM, a modulename and a reference to a objectidentifier followed by imports from other modules.</p>
552
<p>Own Id: OTP-3463</p>
555
<p>The compiler did not check that a name mentioned as EXPORTED
556
actually is defined within the module.
557
This is now corrected.</p>
558
<p>Own Id: OTP-3659</p>
561
<p>Removed bug caused by use of nested indefinite length</p>
562
<p>Own Id: OTP-3994</p>
568
<title>Improvements and new features</title>
569
<list type="bulleted">
571
<p>Now supporting most common use of parameterization according to X.683</p>
572
<p>(Own Id: OTP-3978)</p>
575
<p>PER: Now supporting most common use of Information Objects according to X.681. A new parser has been implemented. The error messages due to syntax errors are slightly different than previous. TableConstraint part of X.682 now also supported.</p>
576
<p>Own Id: OTP-3979</p>
579
<p>New compiler option added: <c>ber_bin</c>. The compiler generates code with new bit syntax. Run time functions uses bit syntax when feasible. Higher encoding/decoding performance in most cases. Se also comments for Asn1 1.2.9.3.</p>
580
<p>Own Id: OTP-3981</p>
583
<p>A more compact format of BIT STRING in Erlang is now available by use of the compiler option <c>compact_bit_string</c>. It is much faster when large BIT STRINGs are used.</p>
584
<p>Own Id: OTP-3982</p>
587
<p>Now possible to merge many ASN.1 input files to one Erlang file by use of a configuration file that lists the ASN.1 files.</p>
588
<p>Own Id: OTP-3983</p>
591
<p>New documentation in <em>User's Guide</em> in section:</p>
592
<p>3.1: New compile-time functions and options are described.</p>
593
<p>4.6: New compact format of BIT STRING is described.</p>
594
<p>4.8: Additional comments on character strings.</p>
595
<p>7: New section describing ASN.1 Information Objects.</p>
596
<p>8: New section describing Parameterization.</p>
597
<p><em>Reference Manual/asn1ct</em> New compile options are described.</p>
598
<p>Own Id: OTP-3984</p>
599
<p>Aux Id: OTP-3978, OTP-3979, OTP-3981, OTP-3982, OTP-3983</p>
602
<p>Added the functionality to invoke ASN1Mod:encode (and decode).</p>
603
<p>Own Id: OTP-3985</p>
606
<p>Performance improvements by removing not necessary use of apply when calling asn1rt:encode. Also other general improvements.</p>
607
<p>Own Id: OTP-3988</p>
614
<title>Asn1 1.2.9.6</title>
617
<title>Known problems</title>
618
<list type="bulleted">
620
<p>The compiler does not check that an exported name actually exists in the ASN.1 module.</p>
621
<p>Own Id: OTP-3659</p>
624
<p>The compiler does not check that a value referenced by name does exist.</p>
625
<p>Own Id: OTP-3277</p>
628
<p>BER: The compiler does not take the extensions into account when checking if
629
the tags are unique in a SEQUENCE or SET.</p>
630
<p>Own Id: OTP-3304</p>
636
<title>Fixed errors and malfunctions</title>
637
<list type="bulleted">
639
<p>PER: Trailing zeroes in a BIT STRING declared without named bits
640
should not be removed in the encodings.</p>
641
<p>Own Id: OTP-3830</p>
648
<title>Asn1 1.2.9.5</title>
651
<title>Known problems</title>
652
<p>Same as for 1.2.9.3.</p>
656
<title>Fixed errors and malfunctions</title>
657
<list type="bulleted">
659
<p>PER: Constraints are not propagated when types are
660
referring to each other. Example:</p>
663
TBCD-STRING ::= OCTET STRING
665
LAI ::= TBCD-STRING (SIZE(3)) </code>
666
<p>The size constraint is not passed on during encode,decode
667
resulting in wrong encoding for PER , it is
668
coded with a length determinant which should not be there
669
when the length is fixed. For BER this does not matter because the constraints does
670
not affect the encodings.</p>
671
<p>Own Id: OTP-3713</p>
674
<p>The generated code gets wrong if there are several ENUMERATED fields in a SEQUENCE or SET, this is now corrected.</p>
675
<p>Own Id: OTP-3796</p>
678
<p>BER:Decode of a type T ::= SEQUENCE OF C fails if C is encoded with indefinite length.
679
This is know corrected.</p>
680
<p>Own Id: OTP-3811</p>
687
<title>Asn1 1.2.9.3</title>
690
<title>Known problems</title>
691
<list type="bulleted">
693
<p>The compiler does not check that an exported name actually exists in the ASN.1 module.</p>
694
<p>Own Id: OTP-3659</p>
697
<p>The compiler does not check that a value referenced by name does exist.</p>
698
<p>Own Id: OTP-3277</p>
701
<p>BER: The compiler does not take the extensions into account when checking if
702
the tags are unique in a SEQUENCE or SET.</p>
703
<p>Own Id: OTP-3304</p>
709
<title>Fixed errors and malfunctions</title>
710
<list type="bulleted">
712
<p>This version supports soft upgrade from versions 1.2.6 1.2.7.</p>
715
<p>In an ENUMERATED type like this:</p>
717
\011\011T ::= ENUMERATED { blue, green} </code>
718
<p>The symbols was encoded/decoded with the wrong values, i.e in
719
reverse order. This is now corrected.</p>
720
<p>Own Id: OTP-3700</p>
723
<p>PER: OCTET STRING with Size constrained to a single value i.e fixed size
724
was treated wrong during encode and decode. This is now corrected.</p>
725
<p>Own Id: OTP-3701</p>
731
<title>Improvements and new features</title>
732
<list type="bulleted">
734
<p>There is now a new compiler option <c>ber_bin</c> available that can be used to
735
generate encode/decode functions for BER that uses the new "bit-syntax" to
736
make the functions more efficient. The <c>ber_bin</c> option is used
737
as an alternative to the <c>ber</c> and <c>per</c> options.</p>
738
<p>The encode function then produces a
739
possibly nested list of binaries and integer lists. The decode function does
740
in this case require a single binary as input instead of a list.
741
The modules generated with this option require that you have an R7A or later
742
system, otherwise they will not compile and the runtime module asn1rt_ber_bin
743
can not be executed.</p>
744
<p>The ber_bin option is not officially supported in this version (will be
745
in a later version) but is provided for those who want to try it.
746
It should be significantly faster at decode and is slightly faster at encode.
747
Exactly how performance differs between this binary approach and the
748
list approach depends highly on the type of input.
749
Another thing worth noting is that both approaches still have a lot of
750
solutions in common which can be improved a lot to gain even better
758
<title>Asn1 1.2.9.2</title>
761
<title>Fixed errors and malfunctions</title>
762
<list type="bulleted">
764
<p>BER: Encode/decode of extension components did not work properly. This is now corrected.</p>
765
<p>Own Id: OTP-3395</p>
767
<p>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
768
value (e.g NULL) encodes to nothing.</p>
769
<p>Own Id: OTP-3496</p>
773
<p>BER:In the current implementation extension components of a SEQUENCE are required
774
to be present when they are specified as mandatory. This is an error, all extension
775
components are "optional" even if they are not specified to have the OPTIONAL or
776
DEFAULT property. This is now corrected.</p>
777
<p>Own Id: OTP-3278</p>
783
<title>Improvements and new features</title>
784
<list type="bulleted">
786
<p>The ASN.1 language feature <c>COMPONENTS OF</c> is now implemented.</p>
787
<p>Own Id: OTP-2515</p>
790
<p>The encoding and decoding of ENUMERATED and
791
INTEGER with NamedNumbers is made more efficient and thus
792
faster in runtime.</p>
793
<p>Own Id: OTP-3464</p>
797
<p>Added support for encode/decode of open type which is
798
constrained to a specific type. Previously the value of
799
an open type had to be a list of octets, but now the Erlang
800
representation of the specific type used in the constraint
801
is used both as input to encode and as output from decode.</p>
802
<p>Own Id: OTP-3569</p>
806
<p>PER: GeneralString, GraphicalString etc. i.e all strings
807
that are not so called "known-multiplier character
808
string types" are now supported by the runtime
809
encode/decode functions.</p>
810
<p>Own Id: OTP-3573</p>
818
<title>Asn1 1.2.6</title>
821
<title>Known problems</title>
822
<list type="bulleted">
824
<p>The ASN.1 language feature <c>COMPONENTS OF</c> is not implemented.</p>
825
<p>Own Id: OTP-2515</p>
828
<p>The compiler does not check that a value referenced by name does exist.</p>
829
<p>Own Id: OTP-3277</p>
832
<p>BER:In the current implementation extension components of a SEQUENCE are required
833
to be present when they are specified as mandatory. This is an error, all extension
834
components are "optional" even if they are not specified to have the OPTIONAL or
835
DEFAULT property.</p>
836
<p>Own Id: OTP-3278</p>
839
<p>BER: The compiler does not take the extensions into account when checking if
840
the tags are unique in a SEQUENCE or SET.</p>
841
<p>Own Id: OTP-3304</p>
847
<title>Fixed errors and malfunctions</title>
848
<list type="bulleted">
850
<p>This version supports soft upgrade from versions 1.1.1, 1.1.5 and 1.1.6.
851
Two new runtime modules <c>asn1rt_ber_v1</c> and
852
<c>asn1rt_per_v1</c> are delivered together with the old ones. This makes
853
it possible to continue running applications with modules generated with the
854
previous version of the asn1 compiler while modules generated by this version
855
will use the new runtime modules. Note that it is only advice-able to continue
856
running old generates if they are working perfectly and have no need
857
for the corrections made in this version of the asn1 application.</p>
860
<p>BER: SEQUENCEs encoded with indefinite length was not correctly decoded.
861
This in now corrected.</p>
862
<p>Own Id: OTP-3352</p>
863
<p>Aux Id: Seq 4100</p>
870
<title>Asn1 1.2.4</title>
873
<title>Fixed errors and malfunctions</title>
874
<list type="bulleted">
876
<p>The compiler now detects multiple definitions of values and types and reports this as
877
an error. Previously this was detected when the generated Erlang module was compiled.</p>
878
<p>Own Id: OTP-3105</p>
881
<p>BER: An error regarding encoding of <c>ENUMERATED</c> present in asn1-1.1.1
882
is corrected. The new version 1.1.2 of asn1 containing this correction is
883
delivered as a "patch".</p>
884
<p>Own Id: OTP-3169</p>
887
<p>BER: Decoding of <c>SEQUENCE OF</c> and <c>SET OF</c> with indefinite length is corrected.
888
The correction was first delivered in version 1.1.2.</p>
889
<p>Own Id: OTP-3170</p>
892
<p>BER: Encoding and decoding of <c>ENUMERATED</c>
894
"..." did not work (crashed with a runtime error). This
895
has now been corrected. If an unknown enumerated value is
896
decoded (for an extensible enumerated type)
897
it is returned as <c>{asn1_enum,Value}</c> where
898
<c>Value</c> is an integer. Enumerated values in this format
899
are also accepted by the encoder.
900
ASN.1 modules containing
901
<c>ENUMERATED</c> with extensionmark should be
902
recompiled with the corrected
903
version of the compiler. The BER runtime functions are also
905
Note that this correction has already been delivered as a
906
bugfix for R4B (OTP-2951).</p>
907
<p>Own Id: OTP-3202</p>
908
<p>Aux Id: Seq3745</p>
911
<p>BER: The primitive/constructed bit in the tag byte of an encoding
912
is not correct when it comes to user defined tags.
915
T ::= [2] SEQUENCE { a BOOLEAN} </code>
916
<p>the tag 2 does not get the constructed bit set which it should.
917
This is now corrected.</p>
918
<p>Own Id: OTP-3241</p>
921
<p>The decoder can now detect if there are unexpected bytes
922
remaining when all components of a sequence are decoded.
923
The decoder will then return <c>{error,{asn1{unexpected,Bytes}}}</c></p>
924
<p>Own Id: OTP-3270</p>
927
<p>Values of type <c>OBJECT IDENTIFIER</c> was sometimes returned as an Erlang list
928
(ASN.1 constants) and sometimes as a tuple (from the decode functions). This is now
929
changed so that <c>OBJECT IDENTIFIER</c> values always are represented as an Erlang
931
<p>Own Id: OTP-3280</p>
934
<p>PER:The encode/decode functions could not handle integers with
935
a range greater than 16#7ffffff. This limit is now removed.</p>
936
<p>Own Id: OTP-3287</p>
939
<p>PER: The encoding/decoding of the length for a SET OF/SEQUENCE OF
940
was wrong if there was a size constraint. This is now corrected.</p>
941
<p>Own Id: OTP-3291</p>
944
<p>PER: Encoding of a constrained INTEGER (range > 16 k) was wrong for
945
the value 0. This is now corrected.</p>
946
<p>Own Id: OTP-3306</p>
952
<title>Improvements and new features</title>
953
<list type="bulleted">
955
<p>The ASN.1 module name and the filename where the ASN.1
956
specification resides must match each other (has always been the
957
case). This is now checked by the compiler. The check requires that
958
the names match in a case or case insensitive way depending on the
959
characteristics for the current system.</p>
960
<p>Own Id: OTP-1843</p>
963
<p>PER: Encode/decode of an extension value (i.e not within the root set) for
964
<c>ENUMERATED</c> did not work properly. This is now corrected.
965
If an unknown enumerated value is
966
decoded (for an extensible enumerated type)
967
it is returned as <c>{asn1_enum,Value}</c> where
968
<c>Value</c> is an integer. Enumerated values in this format
969
are also accepted by the encoder (if the value is >= the number of known
970
extension values).</p>
971
<p>Own Id: OTP-2930</p>
974
<p>Unnecessary printouts from the compiler are removed.
975
The compiler version and the compiler options are now
976
printed to stdout.</p>
977
<p>Own Id: OTP-3276</p>
980
<p>In order to better suite the use of ASN.1 in embedded systems only
981
the modules needed in runtime are now listed in the <c>.app</c> file.</p>
982
<p>Own Id: OTP-3279</p>
985
<p>The compiler now supports extensionmarker in constraint specifications.
988
INTEGER (0..10, ...) </code>
989
<p>In previous version this was reported as a syntax error.</p>
990
<p>Own Id: OTP-3281</p>
993
<p>A very limited part of ITU-T recommendation X.681
994
Abstract Syntax Notation One (ASN.1): Information
995
object specification is now implemented. Specifically \011
996
TYPE IDENTIFIER is reqognized by the compiler.</p>
997
<p>Own Id: OTP-3325</p>
1000
<p>Parameterization of ASN.1 specifications (ITU-T X.683) is now
1001
supported to a limited extent.</p>
1002
<p>Own Id: OTP-3326</p>
1009
<title>Asn1 1.1.3.1</title>
1012
<title>Fixed errors and malfunctions</title>
1013
<list type="bulleted">
1015
<p>BER Encoding and decoding of <c>ENUMERATED</c>
1017
"..." did not work (crashed with a runtime error). This
1018
has now been corrected. If an unknown enumerated value is
1019
decoded (for an extensible enumerated type)
1020
it is returned as <c>{asn1_enum,Value}</c> where
1021
<c>Value</c> is an integer. Enumerated values in this format
1022
are also accepted by the encoder.
1023
ASN.1 modules containing
1024
<c>ENUMERATED</c> with extensionmark should be
1025
recompiled with the corrected
1026
version of the compiler. The BER runtime functions are also
1028
Note that this correction has already been delivered as a
1029
bugfix for R4B (OTP-2951).</p>
1030
<p>Own Id: OTP-3202</p>
1031
<p>Aux Id: Seq3745</p>
1038
<title>Asn1 1.1.1</title>
1041
<title>Known problems</title>
1042
<list type="bulleted">
1044
<p>The syntactic construct <c>COMPONENTS OF</c> is not
1046
<p>Own Id: OTP-2515</p>
1049
<p><c>ANY</c> and <c>ANY DEFINED BY</c> are currently not
1051
<p>Own Id: OTP-2741</p>
1052
<p>Aux Id: seq 1188</p>
1055
<p>Multiple definitions of the same Type or Value is not detected
1056
by the compiler. The error occurs when the generated Erlang
1057
module is compiled.</p>
1058
<p>Own Id: OTP-3105</p>
1065
<title>Asn1 1.1</title>
1068
<title>Known problems</title>
1069
<list type="bulleted">
1071
<p>The primitive/constructed bit in the tag byte of an encoding
1072
is not correct when it comes to user defined tags.
1075
T ::= [2] SEQUENCE { a BOOLEAN} </code>
1076
<p>the tag 2 does not get the constructed bit set which it should.
1077
This is now corrected.</p>
1078
<p>Own Id: OTP-3241</p>
1084
<title>Fixed errors and malfunctions</title>
1085
<list type="bulleted">
1087
<p>The BER decoder failed to decode certain nested data types
1088
where <c>IMPLICIT</c> tags where involved.
1089
This is now corrected.</p>
1090
<p>Own Id: OTP-2719</p>
1091
<p>Aux Id: seq 1148</p>
1094
<p>The handling of types with extension marker "..." is corrected.
1095
Earlier each SEQUENCE and SET with an extension marker got an
1096
extra field named <c>asn1_EXT</c> in the generated record.
1097
This was a mistake and that field is now removed (conserns
1098
both BER and BER).</p>
1099
<p>Own Id: OTP-2724</p>
1100
<p>Aux Id: seq 1148, OTP-2719</p>
1103
<p>The decoder (both BER and PER) could not handle unnamed
1104
bits of a <c>BIT STRING</c> if the type had any
1105
named bits declared. This is now corrected and the unnamed
1106
bits are returned as <c>{bit,Pos}</c> where Pos is the bit
1107
position. The <c>{bit,Pos}</c> can be used as input to the
1109
<p>Own Id: OTP-2725</p>
1110
<p>Aux Id: seq 1148,OTP-2719,OTP-2724</p>
1113
<p>The functions <c>asn1rt:decode</c> and <c>asn1ct:decode</c>
1114
did not always return <c>{ok,Result}</c> or
1115
<c>{error,Reason}</c> as documented. This is now corrected.</p>
1116
<p>Own Id: OTP-2730</p>
1117
<p>Aux Id: seq 1158</p>
1120
<p>The compiler did not accept CHOICE types as components
1121
of a SEQUENCE or SET when
1122
the modules tag default was IMPLICIT.
1125
C ::= CHOICE { ......}
1127
a [1] C, -- This was not accepted
1129
<p>This was an error
1130
caused by a misinterpretation of the ASN.1 standard. This
1131
is now corrected.</p>
1132
<p>Own Id: OTP-2731</p>
1133
<p>Aux Id: seq 1163</p>
1136
<p>When decoding a SEQUENCE A which contains an OPTIONAL component
1137
b which is a SEQUENCE with mandatory components, the decoder
1138
does not detect as an error that a mandatory component of b
1139
is missing. The same error could occur also in other cases
1140
with nested types and optional components of SEQUENCE or SET.
1141
This is now corrected.</p>
1142
<p>Own Id: OTP-2738</p>
1143
<p>Aux Id: seq 1183</p>
1146
<p>BER Encoding and decoding of <c>ENUMERATED</c>
1148
"..." did not work (crashed with a runtime error). This
1149
has now been corrected. If an unknown enumerated value is
1150
decoded (for an extensible enumerated type)
1151
it is returned as <c>{asn1_enum,Value}</c> where
1152
<c>Value</c> is an integer. Enumerated values in this format
1153
are also accepted by the encoder.
1154
ASN.1 modules containing
1155
<c>ENUMERATED</c> with extensionmark should be
1156
recompiled with the corrected
1157
version of the compiler. The BER runtime functions are also
1159
<p>Own Id: OTP-2951</p>
1160
<p>Aux Id: Seq 1446 OTP-2929</p>
1163
<p>The compiler does now accept all valid value notations
1164
for the OBJECT IDENTIFIER type. The generated code for
1165
those values is also corrected.</p>
1166
<p>Own Id: OTP-3059</p>
1172
<title>Improvements and new features</title>
1173
<list type="bulleted">
1175
<p>The code generated for BER is significantly enhanced resulting
1176
in less code and around 300% better performance in runtime
1177
for the encoding of complex ASN.1 values. The performance of
1178
decoding is unchanged.</p>
1179
<p>Own Id: OTP-2806</p>
1186
<title>Asn1 1.0.3</title>
1189
<title>Fixed errors and malfunctions</title>
1190
<list type="bulleted">
1192
<p>The <c>asn1.app</c> file is corrected.</p>
1193
<p>Own Id: OTP-2640</p>
1196
<p>The encoding of integers in BER did not comply with the
1197
standard for all values. The values was not encoded
1198
in the minimum number of octets as required. This is
1199
now corrected in the runtime module <c>asn1rt_ber</c>.</p>
1200
<p>Own Id: OTP-2666</p>
1206
<title>Improvements and new features</title>
1207
<list type="bulleted">
1209
<p>The compiler now generates explicit exports directives for
1211
functions that should be exported (instead of -compile(export_all)).
1212
This eliminates the warnings from the Erlang compiler when
1215
<p>Own Id: OTP-1845</p>
1222
<title>R3B02 (Asn1 1.0.2)</title>
1225
<title>Fixed errors and malfunctions</title>
1226
<list type="bulleted">
1228
<p>The decoding of a BER encoded SEQUENCE with optional component
1229
of type SEQUENCE (also with optional components) could result
1230
in an error or wrong result if the tags are equal.</p>
1231
<p>Own Id: OTP-2226</p>
1234
<p>The encoding of (PER) SEQUENCE with extensionmark was wrong.
1235
This is now corrected.</p>
1236
<p>Own Id: OTP-2349</p>
1243
<title>R3A (Asn1 0.9)</title>
1246
<title>Fixed errors and malfunctions</title>
1247
<list type="bulleted">
1249
<p>The asn1 compiler now detects the use of an implicit tag before <c>CHOICE</c> as an error (in accordance with the standard)</p>
1250
<p>Own Id: OTP-1844</p>
1253
<p>An OPTIONAL CHOICE embedded in SEQUENCE when BER coding
1254
caused an error when generating decode code. This is now
1256
<p>Own Id: OTP-1857</p>
1257
<p>Aux Id: OTP-1848</p>
1264
<title>1 ASN1 0.8.1</title>
1265
<p>This is the first release of the ASN1 application. This version is
1266
released for beta-testing. Some functionality will be added until the
1267
1.0 version is released. See the release notes for the latest version
1268
for the exact details about new features. A list of missing features
1269
and restrictions can be found in the chapter below.</p>
1272
<title>1.1 Missing features and other restrictions</title>
1274
<list type="bulleted">
1276
<p>The encoding rules BER and PER (aligned) is supported. <em>PER (unaligned) IS NOT SUPPORTED</em>.</p>
1279
<p>NOT SUPPORTED types <c>ANY</c> and <c>ANY DEFINED BY</c>
1280
(is not in the standard any more).</p>
1283
<p>NOT SUPPORTED types <c>EXTERNAL</c> and <c>EMBEDDED-PDV</c>. </p>
1286
<p>NOT SUPPORTED type <c>REAL</c> (planned to be implemented). </p>
1289
<p>The code generation support for value definitions in the ASN.1 notation is very limited
1290
(planned to be enhanced).</p>
1293
<p>The support for constraints is limited to:</p>
1296
<list type="bulleted">
1298
<p>SizeConstraint SIZE(X)</p>
1301
<p>SingleValue (1)</p>
1304
<p>ValueRange (X..Y)</p>
1307
<p>PermittedAlpabet FROM (but not for BMPString and UniversalString when generating PER).</p>
1310
<p>Complex expressions in constraints is not supported (planned to be extended).</p>
1313
<p>The current version of the compiler has very limited error checking:</p>
1316
<p>Stops at first syntax error.</p>
1319
<p>Does not stop when a reference to an undefined type is found ,
1320
but prints an error message. Compilation of the generated
1321
Erlang module will then fail.</p>
1324
<p>A whole number of other semantical controls is currently
1325
missing. This means that the compiler will give little
1326
or bad help to detect what's wrong with an ASN.1
1327
specification, but will mostly work very well when the
1328
ASN.1 specification is correct.</p>
1331
<list type="bulleted">
1333
<p>The maximum INTEGER supported in this version is a
1334
signed 64 bit integer. This limitation is probably quite
1335
reasonable. (Planned to be extended).</p>
1338
<p>Only AUTOMATIC TAGS supported for PER.</p>
1341
<p>Only EXPLICIT and IMPLICIT TAGS supported for BER.</p>
1344
<p>The compiler supports decoding of BER-data with indefinite
1345
length but it is not possible to produce data with indefinite
1346
length with the encoder.</p>