Age | Commit message (Collapse) | Author |
|
We will need more explicit control of decoding of open types for
CHOICEs, so refactor the gen_dec_line() and gen_dec_line_imm()
to break out the decoding of the open types.
Note that gen_dec_line_special() will not generate correct code
if Ext =/= noext; thus, we can eliminate the Ext parameter.
|
|
gen_dec_choice2() is unnecessarily complicated. Code is duplicated
merely to avoid outputting a ";" separator after the last item,
and there is code to skip extensionmarks that are never actually
present.
While at it, eliminate the the wrap_gen_dec_line() function which is
not needed. It puts a {component_type,C} key in the process
dictionary, but that is actually never used. Besides that, it only
shuffles the argument.
|
|
gen_enc_choice2() duplicates code merely to avoid outputting a ";"
separator after the last item.
|
|
Ensure that asn1ct_name:start/0 will call asn1ct_name:clear/0 if the
name server process is already running so that we can be sure that
the variables are cleared.
|
|
active/1 always returned 'true' (curr(Var) can never return 'nil',
except if Var =:= 'nil'). Therefore, we can eliminate its use and
remove it.
|
|
clean/1 is used quite lot; while not a bottleneck it does seem
unnecessary to stop and start the name server just to clear the
variables.
Since the change to clean/1 makes stop/1 unused, we can remove it.
|
|
Since new/1 does not return any useful value and cannot fail, there
is no reason to wait for a response from the name server process.
|
|
|
|
Since we no longer need to support push/1 and pop/1, we can simplify
the data structures used for keeping track of the variables.
Each entry in the list can be simply {Var,integer()} instead of
{Var,[integer()]}.
While at it, eliminate calls to the obsolete lists:keysearch/3
function, don't use integer_to_list/0 within a call to lists:concat/1,
and the catch all clause in get_prev/2 and get_next/2.
|
|
asn1ct_name:delete/1 is used from asn1ct_gen_ber_bin_v2:add_removed_bytes/1,
but that function is not used.
|
|
|
|
* maint-r16:
Prepare release
Prepare release
Do not count offline run-queues as empty
Prepare release
Prevent loss of objects after the extension marker
Don't lose the extension mark for object set parameters
Conflicts:
erts/vsn.mk
|
|
|
|
* bjorn/asn1/fix-lost-extension-mark/OTP-10995:
Prevent loss of objects after the extension marker
Don't lose the extension mark for object set parameters
|
|
|
|
In an object set with a single root object, objects after
the extension marker would be lost.
|
|
When an object set is an actual parameter, the extension marker
for the object set could get lost.
|
|
Characters encoded in latin1 (with no encoding comment) will not
work in R17 since the default encoding will be UTF-8.
The asn1 test suite contains two instances of comments written in
Swedish.
The comment in the .asn1config file is hard to understand and possibly
out-of-date. Since the comment is not essential, simply delete it.
Translate the comment in the other file to English.
|
|
|
|
If the encoding is empty (i.e. if a top-level type is single-valued
and therefore not encoding), the result should be a single zero
byte.
|
|
An ENUMERATED with as single value is not encoded. The decoder
incorrectly assumed that it was encoded in one bit.
|
|
|
|
|
|
|
|
Some tests are are only run with BER backend. Unless there is a
special reason that the PER and UPER backends will not work, we
should run all tests with all backends to get the best possible
code coverage.
|
|
|
|
Also teach otp_SUITE:call_to_size/1 that calls to size/1 is no
longer allowed within the asn1 application.
|
|
It is recommended to use byte_size/1 or tuple_size/1 instead of
size/1.
|
|
|
|
|
|
The ASN.1 compiler would generate an Erlang module with
incorrect syntax for:
T DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
Empty ::= SET {
}
S ::= SEQUENCE {
e Empty DEFAULT {}
}
END
|
|
Commit f16f43446a04c459486356c0b4ad517cc9201895 broke compilation
of InformationFramework for per and uper.
|
|
Was broken in some backends in R15. Make sure that we will notice
if it breaks again.
|
|
On Windows, there is a limit to the number of characters in a
filename. Therefore, we don't want unnecessarily use any longer
path than necessary for case-specific directory. Since all test
cases that put anything into priv_dir is asn1_SUITE, it is not
necessary to include "asn1_SUITE" as part of the case-specific
directory.
|
|
All generated and compiled code are now put into separate sub
directories below priv_dir, so there is no point in adding
priv_dir to the code path.
|
|
|
|
* maint:
Prepare release
Don't run testX420/1 on old slow Sparc systems
testX420: Pass Options to the ASN.1 compiler
asn1_erl_nif: Correct broken length encoding
asn1_SUITE: Mend broken test_modified_x420/1
Revert "Prepare release"
Conflicts:
lib/asn1/doc/src/notes.xml
lib/asn1/test/asn1_SUITE.erl
|
|
* maint-r15:
Prepare release
Don't run testX420/1 on old slow Sparc systems
testX420: Pass Options to the ASN.1 compiler
asn1_erl_nif: Correct broken length encoding
asn1_SUITE: Mend broken test_modified_x420/1
Fix a bug for multiple extension addition groups
|
|
|
|
* bjorn/asn1/open-type-error/OTP-10805:
asn1_erl_nif: Correct broken length encoding
asn1_SUITE: Mend broken test_modified_x420/1
|
|
* bjorn/asn1/extension-addition-groups/OTP-10811:
Fix a bug for multiple extension addition groups
|
|
One and a half hour is not enough for it to finish.
|
|
When the caller passed the 'der' option, it was ignored.
|
|
The ber_bin_v2 backend calls a NIF function to decode all tags
and lengths. Even open types that should not be decoded will also be
decoded, which makes it necessary to later re-encode the data using
a NIF function.
The NIF function incorrectly encoded lengths.
|
|
The test_modified_x420/1 test case had several problems that
prevented it to detect the bugs it was supposed to find:
1) There was a 'catch' at the top-level so that it could never fail.
2) There was a call to the now non-existing ssl_base64 module.
3) It did not test all options for the BER backend.
While at it, also clean way the remaining ?line macros and some
out-commented code.
|
|
|
|
|
|
* bjorn/asn1/further-cleanup/OTP-10588: (28 commits)
Don't export encode_disp/2 and decode_disp/2 in generated modules
Remove vestiges of support for the {TypeName,Value} notation
Simplify the functions for decoding lengths
per,uper: Optimize decoding of the remaining data types
per,uper: Optimize decoding of the remaining string types
Share all code for dec_gen_prim/3 between per/uper back-ends
per,uper: Optimize decoding of the string data types
testPrimStrings: Test some constraints
By default, encode BIT STRING to bitstrings
Teach encode functions to accept a bitstring term for a BIT STRING
Fix EXTERNAL 1990/1994 conversion information loss
uper: Look up some SizeConstraints at compile-time
Enumeration decoding: Don't emit a default clause if it cannot match
Slightly optimize per encoding of large INTEGERs with constraints
BER run-time: Refactor decoding of string data types
Refactor decoding of BIT STRINGs
Optimize encoding of ENUMERATED in per and uper
Remove the unused run-time modules
eldap: Remove calls to undocumented asn1rt* functions
BER: Correct bug in 'undec_rest'
...
|
|
Those functions were exported for no good reason.
|
|
Support in BER was removed in 3d1279f3cebfdd2483c3afea9f225613fe45cd00.
|