diff options
author | Dan Gudmundsson <[email protected]> | 2014-10-07 17:08:09 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:25 +0100 |
commit | e43a382e7207a3c01baba2ef202b49766b60fdae (patch) | |
tree | d36624f0be563a5dbbcd25e7bd7ac88d48cfef2e /lib/asn1/test/asn1_SUITE_data/InfObj.asn | |
parent | 86a2bbe5c88c1be6450b53a2b5cb30a099683762 (diff) | |
download | otp-e43a382e7207a3c01baba2ef202b49766b60fdae.tar.gz otp-e43a382e7207a3c01baba2ef202b49766b60fdae.tar.bz2 otp-e43a382e7207a3c01baba2ef202b49766b60fdae.zip |
Clean up and correct validation of OBJECT IDENTIFIER/RELATIVE-OID
Besides simplifying the code and doing better error checking
and error reporting, fix the following bugs:
Support retrieving an OBJECT IDENTIFIER/RELATIVE-OID from an
object. Example:
oid OBJECT IDENTIFIER ::= some-object.&some-field
Allow an integer constant first in an OBJECT IDENTIFIER:
integer INTEGER ::= 0
oid OBJECT IDENTIFIER ::= {integer 1}
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data/InfObj.asn')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/InfObj.asn | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/InfObj.asn b/lib/asn1/test/asn1_SUITE_data/InfObj.asn index aadd642f97..b24d747f0e 100644 --- a/lib/asn1/test/asn1_SUITE_data/InfObj.asn +++ b/lib/asn1/test/asn1_SUITE_data/InfObj.asn @@ -360,6 +360,26 @@ object-with-optional-bit-string PUBLIC-KEY ::= { OPTIONAL-BIT-STRING {digitalSignature, nonRepudiation, keyEncipherment} } +-- Test object identifiers from objects. + +CONTAINER ::= CLASS { + &id OBJECT IDENTIFIER UNIQUE, + &rid RELATIVE-OID OPTIONAL, + &Type OPTIONAL +} WITH SYNTAX { + IDENTIFIED BY &id + [REL-OID &rid] + [TYPE &Type] +} + +id1 OBJECT IDENTIFIER ::= {1 2 42} +obj1 CONTAINER ::= { IDENTIFIED BY id1 REL-OID {100 101} } + +value-2 OBJECT IDENTIFIER ::= { value-1 25 } +value-1 OBJECT IDENTIFIER ::= obj1.&id +value-3 RELATIVE-OID ::= obj1.&rid +value-4 OBJECT IDENTIFIER ::= { 1 2 value-3 } + END |