Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
* 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 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.
|
|
|
|
Support in BER was removed in 3d1279f3cebfdd2483c3afea9f225613fe45cd00.
|
|
|
|
Add the option 'legacy_bit_string' to decode to the old list format.
|
|
There are two different definitions of the EXTERNAL data type in ASN.1:
the original from 1990 and an updated from 1994. Both defintions
are encoded in the same way (in BER). There are still
systems in use that use the old definition of EXTERNAL, so the
asn1 application must still support both.
It has been decided that the asn1 application should handle both
the forms without any compiler options. Internally the asn1 application
uses the 1990 definition. The encode functions will accept both
definitions, but translate the 1994 format to the 1990 format
if needed. When decoding, it will decode to the 1990 definition format
first and then translate to the 1994 defintion format.
One problem with this approach is that the conversion to the 1994
format may not be loss-less (where the 1990 defintion had a CHOICE
between an OPEN TYPE, OCTET STRING, or BIT STRING, the 1994 definition
only supports an OCTET STRING), and therefore it might not be possible
to correctly re-encode the data in the 1990 format.
It seems that the only reliable way to handle that problem is to not
do the conversion to the 1994 format if the conversion is not
loss-less. (There is an attempt when translating to the 1990 format
to recover the CHOICE alternative based on the Erlang type of
the data value, but that is neither reliable nor future-proof.)
That is, when decoding an EXTERNAL value, the resulting
tuple could either conform to the 1990 or 1994 definition, and
applications must be prepared to handle that.
The mail conversation where this issue was first reported can be
found here:
http://erlang.org/pipermail/erlang-questions/2011-April/057697.html
Reported-by: Harald Welte <[email protected]>
|
|
Always pre-encode the values for the enumeration. Clean up the
code and let the per and uper back-ends share the code.
|
|
enif_make_new_binary() cannot return NULL, so while at it,
remove the check for return value of enif_make_new_binary()
being NULL.
|
|
Also make sure that the error handling is contained within the
asn1rt_nif module and does not leak out to generated code.
|
|
|
|
|
|
The template modules (asn1rtt_*.erl) are based on the existing
run-time modules, but with some simplifications and improvements,
for example:
The run-time functions for BER encoding took a Constraint argument which
was not used. It has been eliminated, along with the unused StringType
argument for the encode_restricted_string function.
The Range argument for decode_enumerated() has been dropped since it
was not used.
|
|
|
|
* bjorn/asn1/extension-addition-groups/OTP-10664:
Fix a bug for multiple extension addition groups
|
|
Encoding would fail.
|
|
|
|
Support for the notation was removed in 6ef8cbdaaaa1c30a7dc462063.
|
|
The constraint simplification pass need to be seriously rethought
and rewritten.
As a starting point, add a test case to test that equivalent ways
to write a constraint are reduced to the same simplified constraint.
Fix a few obvious bugs to make the test cases to pass.
|
|
Extensions following a double bracket group were not skipped correctly.
Fix this bug and add tests to ensure that extensions are skipped
correctly.
|
|
|
|
Also run the test case for all back-ends.
|
|
|
|
|
|
|
|
Make the test suite more readable by introducing and using a
roundtrip/2 function.
|
|
|
|
|
|
Eliminate the spawning of the process since the original bug is
fixed.
|
|
|
|
Decoding of fragmented OCTET STRINGs was only implemented when the size
was constrained to a single value. While at it, support decoding
fragmented OCTET STRINGS in all circumstances.
|
|
|
|
Reduce verbosity and introduce readability by introducing the roundtrip/2
function. That will help us to do future extensions to this test suite.
|
|
|
|
|
|
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.
|