From e43a382e7207a3c01baba2ef202b49766b60fdae Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 7 Oct 2014 17:08:09 +0200 Subject: 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} --- lib/asn1/test/testValueTest.erl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/asn1/test/testValueTest.erl') diff --git a/lib/asn1/test/testValueTest.erl b/lib/asn1/test/testValueTest.erl index 24a2862b40..d1532c3ef0 100644 --- a/lib/asn1/test/testValueTest.erl +++ b/lib/asn1/test/testValueTest.erl @@ -33,7 +33,14 @@ main() -> [zero,two] = M:'vBS'(), 'NULL' = M:'vNULL'(), <<16#31,16#32,16#33>> = M:'vOS'(), + + %% OID {2,1,1} = M:'vOD'(), + {1,2} = M:'integer-first'(), + {2,4,5} = M:'rel-oid-1'(), + {0,2,4,5} = M:'include-roid'(), + {1,2,1} = M:'include-oid'(), + {1,2,1,2,4,5,42} = M:'include-all'(), %% Character strings "01234567" = M:'numericstring'(), -- cgit v1.2.3