diff options
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/InfObj.asn | 23 | ||||
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1 | 35 |
2 files changed, 58 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/InfObj.asn b/lib/asn1/test/asn1_SUITE_data/InfObj.asn index 719119f418..fbce12fd88 100644 --- a/lib/asn1/test/asn1_SUITE_data/InfObj.asn +++ b/lib/asn1/test/asn1_SUITE_data/InfObj.asn @@ -300,6 +300,29 @@ ExOstSeq123 ::= ObjectSetTest{ {ExOst123} } ExOstSeq45 ::= ObjectSetTest{ {ExOst45} } ExOstSeq12345 ::= ObjectSetTest{ {ExOst12345} } +-- +-- Test a BIT STRING which is optional in the simplified syntax. +-- + +PUBLIC-KEY ::= CLASS { + &id INTEGER UNIQUE, + &keyUsage KeyUsage OPTIONAL +} WITH SYNTAX { + IDENTIFIER &id + [OPTIONAL-BIT-STRING &keyUsage] +} + +KeyUsage ::= BIT STRING { + digitalSignature (0), + nonRepudiation (1), + keyEncipherment (2) + } + +object-with-optional-bit-string PUBLIC-KEY ::= { + IDENTIFIER 42 + OPTIONAL-BIT-STRING {digitalSignature, nonRepudiation, keyEncipherment} +} + END diff --git a/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1 b/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1 index 4a8889f940..0ee8e178fd 100644 --- a/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/InfObjExtract.asn1 @@ -20,6 +20,13 @@ ObjSet DATA-CLASS ::= { ... } +OBJ-SET DATA-CLASS ::= { + holder-object-1.&obj | + data-object-2 | + data-object-3, + ... +} + holder-object-1 HOLDER-CLASS ::= { OBJ data-object-1 } @@ -32,6 +39,29 @@ holder-object-3 HOLDER-CLASS ::= { OBJ-SET {holder-object-2.&ObjSet} } +-- Note: References to object sets with names in all uppercase/hyphens +-- may be represented differently compared to object sets with names +-- that contain lowercase letters. CAVEAT TESTOR. + +HOLDER-OBJECTS HOLDER-CLASS ::= { holder-object-2 } +HolderObjects HOLDER-CLASS ::= { holder-object-3 } + +holder-object-4 HOLDER-CLASS ::= { + OBJ-SET { HOLDER-OBJECTS.&ObjSet } +} + +holder-object-5 HOLDER-CLASS ::= { + OBJ-SET { HolderObjects.&ObjSet } +} + +holder-object-6 HOLDER-CLASS ::= { + OBJ-SET { OBJ-SET } +} + +holder-object-7 HOLDER-CLASS ::= { + OBJ-SET { ObjSet } +} + HOLDER-CLASS ::= CLASS { &obj DATA-CLASS OPTIONAL, &ObjSet DATA-CLASS OPTIONAL @@ -48,4 +78,9 @@ TestSeq{DATA-CLASS:ObjectSet} ::= SEQUENCE { DataSeq-1 ::= TestSeq{ {ObjSet} } DataSeq-2 ::= TestSeq{ {holder-object-3.&ObjSet} } +DataSeq-3 ::= TestSeq{ {holder-object-4.&ObjSet} } +DataSeq-4 ::= TestSeq{ {holder-object-5.&ObjSet} } +DataSeq-5 ::= TestSeq{ {holder-object-6.&ObjSet} } +DataSeq-6 ::= TestSeq{ {holder-object-7.&ObjSet} } + END |