Age | Commit message (Collapse) | Author |
|
|
|
Just crash if there is an internal error.
|
|
* Remove out-commented code
* Fix obvious typos and bad grammar
* Adhere to the conventions for when to use "%" and "%%".
|
|
When the 'maps' option is given, the SEQUENCE and SET types are
represented as maps instead of as records. Optional and default values
must be not be given as asn1_NOVALUE or asn1_DEFAULT in a map passed
to the M:encode/2 function; they must be omitted from the
map. Similarly, when decoding missing values will be omitted from the
map.
No .hrl files will be generated when the 'maps' options is used.
That means values in an ASN.1 module must be retrieved by calling the
appropriate function in generated module.
Since we one day hope to get rid of the options 'compact_bit_string',
'legacy_bit_string', and 'legacy_erlang_types', we will not allow them
to be combined with the 'maps' option.
|
|
Remove the entire asn1rt module. All functions in it were deprecated in
OTP 17.
In asn1ct, remove the deprecated functions asn1ct:encode/3 and
asn1ct:decode/3. Also remove asn1ct:encode/2, which has not been
formally deprecated but is undocumented.
|
|
|
|
In most cases, we don't have to seed the random number generator,
as the rand:uniform/1 takes care about that itself.
|
|
|
|
|
|
Those asn1 functions are no longer needed because they all have
better alternatives.
|
|
|
|
|
|
The asn1ct:value/2 function would crash for name INTEGERs with
constraints, such as INTEGER {a(2),b(3),z(17)} (2|3|17, ...).
|
|
There is (differenct) code for reading .asn1db files both in
asn1ct and asn1_db. Consolidate the reading into one routine
in asn1db.
Another problem is that the encoding rule that the .asn1db
file was created for is not in the .asn1db, but only in the
generated Erlang module. It is much easier and safer to put
the encoding rule in the .asn1db file itself. We will also
put the version number of the asn1 application into the file,
to ensure that we don't use an old .asn1db file that could
potentially be incompatible.
|
|
The last clause in asn1ct_gen:type/1 does a catched call to type2/1.
If the type2/1 fails {notype,X} is returned.
Since the body of type2/1 essentially is:
case lists:member(X, [...]) of
true ->
{primitive,bif};
false ->
case lists:member(X, [...]) of
true ->
{constructed,bif};
false ->
{undefined,user}
end
end
there is no way that type2/1 can fail. Therefore, we can eliminate
the catch and put the body of type2/1 into the last clause of
type/1. We can also eliminate the code in the callers of type/1
that match {notype,X}.
|
|
asn1ct_check has translated all occurrences of 'ANY' to 'ASN1_OPEN_TYPE'.
|
|
|
|
Add the option 'legacy_bit_string' to decode to the old list format.
|
|
|
|
|
|
It is time to clean up the mess of back-ends.
Remove all the obsolete back-ends and simplify the options used
to select them.
New Option Old Equivalent
---------- --------------
ber ber_bin,optimize,nif
per per,optimize,nif
uper uper_bin
The old options will still be recognized and translated to the
new options, but will also print a warning.
That implies that deprecated features that only are implemented
in the old 'ber' back-end will no longer work (e.g. the
{Typename,Value} notation).
Also make the return type for the generated encode/2 function
consistent. It used to be a binary for per and uper, and an iolist
for ber. Always make it a binary.
|
|
- Refactor and clean up asn1_db process
- Remove unused stop function in asn1ct.erl
- Remove infinite loop possibilites in asn1ct_check.erl
- test/1,2,3 now run in separate process
- Update documentation for new test options
|
|
|
|
|
|
|