aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data/InfObj.asn
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-09-02 13:16:53 +0200
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:24 +0100
commit33b19f4ed08f84459ed762dbb50ea0cf148ebfd3 (patch)
treeb52738b8a711fddf218bfa16df02335a865d6a9c /lib/asn1/test/asn1_SUITE_data/InfObj.asn
parent8e43bffda5069aecdd2375eb409e9c03b7ff692b (diff)
downloadotp-33b19f4ed08f84459ed762dbb50ea0cf148ebfd3.tar.gz
otp-33b19f4ed08f84459ed762dbb50ea0cf148ebfd3.tar.bz2
otp-33b19f4ed08f84459ed762dbb50ea0cf148ebfd3.zip
Rewrite matching of object definitions using the simplified syntax
Rewrite the confusing and buggy matching of an object definition against the simplified syntax. While we are at it, we will also add proper error handling.
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data/InfObj.asn')
-rw-r--r--lib/asn1/test/asn1_SUITE_data/InfObj.asn23
1 files changed, 23 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