aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data
AgeCommit message (Collapse)Author
2015-03-06asn1ct_gen: Correct generation of .hrl files for multiple ellipsesBjörn Gustavsson
2015-03-06Fix BER code generationDan Gudmundsson
PKIX1Explicit-2009 did not compile. This commit was cherry-picked from 3ab3b07a already merged into master.
2014-11-27Merge branch 'dgud/asn1/fix-seqtag/OTP-12326' into maintDan Gudmundsson
* dgud/asn1/fix-seqtag/OTP-12326: asn1: Fix EXTERNAL (1994 variant) type conversion
2014-11-26asn1: Fix EXTERNAL (1994 variant) type conversionDan Gudmundsson
Missed to add seqtag handling for EXTERNAL type conversion, bug introduced in c266196c016fc1156c7a18cfeec4920ee4075519
2014-11-18Add test for IMPLICIT tagging when TagDefault is AUTOMATICSimon Cornish
2014-09-29BER decoding: Don't allow primitives with indefinite lengthsBjörn Gustavsson
According to the BER encoding rules, only constructed values may have indefinite lengths. A primitive value must be encoded with a definite length. Reported-by: Simon Cornish
2014-09-01Workaround for combining two object sets separated by extensionBjörn Gustavsson
The following type of code would crash the compiler: OSET SOME-CLASS ::= {OSET1, ..., OSET2}
2014-09-01Correct expansion of parameterized typesBjörn Gustavsson
Attempting to compile: SomeType{SOME-CLASS-NAME, SOME-CLASS-NAME:SomeSet} ::= ... SEQUENCE { something SOME-CLASS-NAME.&id({SomeSet}) } would crash the compiler, because the actual parameter for SOME-CLASS-NAME was not substituted into the governor for the SomeSet parameter. While we are at it, combine the functionality of is_class/2 and get_class_def/2 (eliminating is_class/2). Most callers call both function.
2014-06-05(U)PER: Fix decoding of named INTEGERBjörn Gustavsson
2014-06-05(U)PER: Fix encoding of a semi-constrained, named INTEGERBjörn Gustavsson
The code generator would crash.
2014-06-05Improve tests of DEFAULT valuesBjörn Gustavsson
2014-05-06Set.py: Correct illegal DEFAULT valueBjörn Gustavsson
If SetIn is defined like this: SetIn ::= SET { boolIn BOOLEAN, intIn INTEGER } then it may not be used with an empty DEFAULT value like this: SetDef1 ::= SET { set1 SetIn DEFAULT {} } The ASN.1 compiler prints an warning message, but still generates code. (That should be fixed.) Fix the incorrect ASN.1 specification by making the components in SetIn optional: SetIn ::= SET { boolIn BOOLEAN OPTIONAL, intIn INTEGER OPTIONAL }
2014-02-28Clean up reporting of errors in IMPORTSBjörn Gustavsson
2014-02-28asn1ct_check: Clean up error checking for INSTANCE OFBjörn Gustavsson
This will also eliminate a dialyzer warning for unmatched returns, and increase the coverage.
2014-02-13Correct subtyping of extensible ENUMERATEDBjörn Gustavsson
Attempting to subtype an extensible ENUMERATED like this: BaseType ::= { foo, bar, ... } SubType ::= BaseType ( foo ) would fail to compile with a message that 'foo' was undefined. Reported-by: Morten Nygaard Åsnes
2014-01-24Fix OCTET STRINGBjörn Gustavsson
2014-01-20Test open types that may need more than 128 bytesBjörn Gustavsson
2013-12-02Merge branch 'bjorn/asn1/fix-integer-constraint/OTP-11504' into maintBjörn Gustavsson
* bjorn/asn1/fix-integer-constraint/OTP-11504: PER/UPER: Handle a range in the extension part of the constraint
2013-11-29PER/UPER: Handle a range in the extension part of the constraintBjörn Gustavsson
Constraints such as: INTEGER (1..10, ..., 11..20) would fail to compile. Make sure it is properly ignored.
2013-11-20Merge branch 'bjorn/asn1/fix-union-bug/OTP-11411' into maintBjörn Gustavsson
* bjorn/asn1/fix-union-bug/OTP-11411: Fix complicated union of INTEGER constraints
2013-10-21Merge branch 'bjorn/asn1/fix-extensible-single-values/OTP-11415' into maintBjörn Gustavsson
* bjorn/asn1/fix-extensible-single-values/OTP-11415: PER/UPER: Correct encoding for single-value extensible constraints asn1ct_value: Handle named INTEGERs with constraints
2013-10-17Fix complicated union of INTEGER constraintsBjörn Gustavsson
A constraint that was an union of integer ranges: Type ::= INTEGER (lb1..ub1 | ... | lbN..ubN) would sometimes (depending on the values) not all always be properly combined to a single effective range, but would become: Type ::= INTEGER (lb2..ub2) (lb3..ub3) If that type was used in a SEQUENCE: S ::= SEQUENCE { v Type } the constraint would be simplified, taking the intersection of the ranges.
2013-10-01Fix broken handling of default values for BIT STRINGsBjörn Gustavsson
For DER/PER/UPER, a value equal to the DEFAULT is not supposed to be encoded. BIT STRINGs values can be represented as Erlang terms in four different ways: as an integer, as a list of zeroes and ones, as a {Unused,Binary} tuple, or as an Erlang bitstring. When encoding a BIT STRING, only certain representations of BIT STRINGs values were recognized. All representations must be recognized. When decoding a DEFAULT value for a BIT STRING, the actual value given in the decoding would be either an integer or a list of zeroes and one (depending on how the literal was written in the specification). We expect that the default value should be in the same representation as any other BIT STRING value (i.e. by default an Erlang bitstring, or a list if the 'legacy_bitstring' option has been given, or as compact bitstring if 'compact_bitstring' has been given).
2013-09-30PER/UPER: Correct encoding for single-value extensible constraintsBjörn Gustavsson
An extensible constraint which is a union of single values, such as: INTEGER (1|17, ...) would be incorrectly encoded.
2013-09-18Move out specific tests from asn1_test_libBjörn Gustavsson
asn1_test_lib is supposed to be a general-purpose helper module for test cases. Move all specific test cases into asn1_SUITE.
2013-09-03PER, UPER: Fix encoding/decoding of open types greater than 16KBjörn Gustavsson
2013-08-30Improve tests of deep table constraintsBjörn Gustavsson
2013-08-30BER: Handle multiple optional SEQUENCE fields with table constraintsBjörn Gustavsson
2013-08-30Test OPTIONAL and DEFAULT for open typesBjörn Gustavsson
2013-08-30PER/UPER: Fix encoding of an object set with multiple inlined constructsBjörn Gustavsson
Also extend the test suite with more tests of inlined constructs in object sets.
2013-08-30Extend the test for parameterized information objectsBjörn Gustavsson
2013-08-30SeqOf: Add more tricky SEQUENCE OF testsBjörn Gustavsson
2013-06-10Merge branch 'bjorn/asn1/not-small-bugs/OTP-11153' into maintBjörn Gustavsson
* bjorn/asn1/not-small-bugs/OTP-11153: PER/UPER: Correct decoding of SEQUENCEs with more than 64 extensions testConstraints: Improve tests of semi-constrained INTEGERs Test ENUMERATED with many extended values UPER: Correct encoding of ENUMERATED with more than 63 extended values Add asn1_test_lib:hex_to_bin/1
2013-06-08PER/UPER: Correct decoding of SEQUENCEs with more than 64 extensionsBjörn Gustavsson
2013-06-08Test ENUMERATED with many extended valuesBjörn Gustavsson
2013-06-07PER, UPER: Fix record name mismatch between HRL file and decoding codeBjörn Gustavsson
When a SEQUENCE was defined inline inside extension addition group like this: InlinedSeq ::= SEQUENCE { ..., [[ s SEQUENCE { a INTEGER, b BOOLEAN } ]] } the decoding code would return the contents of the SEQUENCE in a record named 'InlinedSeq_ExtAddGroup1_s', while the record definition in the generated HRL file would be 'InlinedSeq_s'. Since there is no reason to use the longer record name (no risk for ambiguity), correct the name in the decoding code.
2013-06-03testSeqOf: Test constrained, extensible sizesBjörn Gustavsson
2013-05-31Extend tests cases for BIT STRINGBjörn Gustavsson
2013-05-31Improve tests of ENUMERATEDBjörn Gustavsson
2013-05-31asn1ct_check: Don't pass on #'ObjectClassFieldType'{} with fixed typeBjörn Gustavsson
Simplify the backends by letting asn1ct_check replacing a with the actual type.
2013-05-31Fix encoding of semi-constrained, extensible INTEGERsBjörn Gustavsson
Given: Semi ::= INTEGER (Lb..MAX, ...) where Lb is an arbitrary integer, attempting to encode an integer less than Lb would cause the encoder to enter an infinite loop.
2013-05-31PER/UPER: Fix decoding of semi-constrained INTEGERsBjörn Gustavsson
A semi-constrained INTEGER with a non-zero lower bound would be incorrectly decoded. This bug was introduced in R16.
2013-05-31testPrim: Simplify test cases using a roundtrip functionBjörn Gustavsson
While at it, also test more integer values.
2013-05-31BER: Fix handling of a constructed default value for a classBjörn Gustavsson
2013-05-31PER: Generate code for deep table constraints at compile-timeBjörn Gustavsson
For the PER backends, generate code for accessing deep table constraints at compile-time in the same way as is done for BER. While at it, remove the complicated indentation code. Also modernize the test suite and add a test for a deeper nested constraint.
2013-05-31Extend tests to cover more code in asn1ct_checkBjörn Gustavsson
2013-05-31Clean up checking of values for ENUMERATEDsBjörn Gustavsson
Unify the code for checking an enumeration value named in a DEFAULT and in an ENUMERATED value. There is no need to handle those cases differently. That also will also make sure that the following works: E ::= ENUMERATED { x, ..., y } e E ::= x (Extensible ENUMERATEDs were not handled when defining values.) Always generate an error when an unknown enumeration value is given (used in a DEFAULT, a message would be printed, but the compilation would succeed). Also make sure that we always include the line number for the incorrect enumeration. Write a new test case and remove the extremely rudimentary value_bad_enum_test/1 test case.
2013-05-31Remove files that are not used by any test caseBjörn Gustavsson
The list of files to remove was obtained by running "ls -lut" after running the test cases and comparing the atime for each file with the start of the test run.
2013-05-31testExtensionAddtionGroup/1: Clean up and enhanceBjörn Gustavsson
For the example from X.691, make sure to test that our encoded value is the same as given in X.691. Run the test for BER, too.
2013-05-31Normalize SIZE constraints to simplify backendsBjörn Gustavsson