Age | Commit message (Collapse) | Author |
|
Even if the roundtrip functions are very simply, putting them here
makes it possible to change its behavior in one place (e.g. if we
are to change encode and decode not to wrap the result in a ok tuple
in some future release).
|
|
There are some minor incompatibilities for BIT STRING:
{bit,Position} is now only only supported for a named
BIT STRING type.
Values longer than the maximum size for the BIT STRING type
would be truncated silently - they now cause an exception.
|
|
|
|
Eliminate use of line macros and asn1_wrapper.
|
|
|
|
The encoder wrongly assumed that a known multiplier string (such as
IA5String) encoded as exactly 16 bits did not need to be aligned to an
octet boundary. X.691 (07/2002) 27.5.7 says that it does. Since an
OCTET STRING encoded to 16 bits (two octets) should not be aligned to
an octet boundary, that means that asnct_imm:dec_string() needs an
additional parameter to determine whether a string of a given length
needs to be aligned.
Furthermore, there is another subtle rule difference: An OCTET STRING
which does not have fixed length is always aligned (in PER), but
a known multiplier string is aligned if its upper bound is greater
than or equal to 16.
In encoding, make sure that short known multiplier strings and
OCTET STRINGs with extensible sizes are not aligned when they are
below the appropriate limit.
|
|
|
|
|
|
Add the option 'legacy_bit_string' to decode to the old list format.
|
|
|
|
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.
|
|
|
|
* bg/asn1-tests:
asn1 tests: Let ts:run() build the tests
asn1 tests: No longer tolerate compilation warnings
asn1 tests: Eliminate use of deprecated concat_binary/1
asn1 tests: Eliminate warning for an unused variable
asn1 tests: Modernize guard tests
asn1 tests: Clean up comments
asn1 tests: Don't refer to $ERL_TOP in compiler options
OTP-8520 bg/asn1-tests
|
|
|
|
On Windows, $ERL_TOP contains a cygwin-style pathname
that can be used in Makefiles to (for instance) include
other Makefiles, but must not be passed to non-cygwin programs
such as "erlc". Therefore, using compiler options such as
"-I $(ERL_TOP)/lib/test_server/include" will not work on
Windows.
Fix this problem by include "test_server.hrl" using
-include_lib() instead of -include(). That works because
-include_lib() searches for include files in the code path
without the need for any -I options.
|
|
added.
|