diff options
author | Ingela Andin <[email protected]> | 2019-03-22 10:03:13 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-03-22 10:03:13 +0100 |
commit | d096ca2c0cebec816fa2e0386b7e5f0d8cd62a88 (patch) | |
tree | 799810afaf085beec0cce2d20bcba8324e791efa /lib/asn1/test/asn1_SUITE_data | |
parent | 5b62f4db7e6238f784c8f485baaa7f8fc61cd56c (diff) | |
parent | 7b73f5119b6a7bdadb2255b05dbd3463ec24e16f (diff) | |
download | otp-d096ca2c0cebec816fa2e0386b7e5f0d8cd62a88.tar.gz otp-d096ca2c0cebec816fa2e0386b7e5f0d8cd62a88.tar.bz2 otp-d096ca2c0cebec816fa2e0386b7e5f0d8cd62a88.zip |
Merge pull request #2159 from dotsimon/asn1_pedefs
ASN.1: fix various problems with value definitions
OTP-15697
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/ChoExtension.asn1 | 2 | ||||
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/DefaultOctetString.asn | 15 | ||||
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/SeqOfChoExt.asn1 | 27 |
3 files changed, 44 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/ChoExtension.asn1 b/lib/asn1/test/asn1_SUITE_data/ChoExtension.asn1 index 18473bae30..c488704196 100644 --- a/lib/asn1/test/asn1_SUITE_data/ChoExtension.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/ChoExtension.asn1 @@ -41,4 +41,6 @@ ChoExt4 ::= CHOICE str OCTET STRING } +choExt1 ChoExt1 ::= int : 1 + END diff --git a/lib/asn1/test/asn1_SUITE_data/DefaultOctetString.asn b/lib/asn1/test/asn1_SUITE_data/DefaultOctetString.asn new file mode 100644 index 0000000000..076e965d58 --- /dev/null +++ b/lib/asn1/test/asn1_SUITE_data/DefaultOctetString.asn @@ -0,0 +1,15 @@ +DefaultOctetString +DEFINITIONS +AUTOMATIC TAGS + ::= +BEGIN +Dos ::= SEQUENCE { + opt [2] OCTET STRING (SIZE(2..4)) OPTIONAL, + def [10] OCTET STRING (SIZE (1)) DEFAULT '05'H +} + +dos Dos ::= { + opt '1234'H +} + +END diff --git a/lib/asn1/test/asn1_SUITE_data/SeqOfChoExt.asn1 b/lib/asn1/test/asn1_SUITE_data/SeqOfChoExt.asn1 new file mode 100644 index 0000000000..51077754fd --- /dev/null +++ b/lib/asn1/test/asn1_SUITE_data/SeqOfChoExt.asn1 @@ -0,0 +1,27 @@ +SeqOfChoExt DEFINITIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::=
+BEGIN
+
+Seq2 ::= SEQUENCE {
+ octstr [PRIVATE 6] OCTET STRING OPTIONAL
+}
+
+SeqOfCho ::= SEQUENCE OF CHOICE {
+ nullable NULL,
+ seq2 Seq2
+}
+
+Seq1 ::= SEQUENCE {
+ int INTEGER,
+ soc SeqOfCho
+}
+
+seq1 Seq1 ::= {
+ int 10,
+ soc {
+ seq2 : {
+ octstr '01020A'H
+ }
+ }
+}
+
+END
|