aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test')
-rw-r--r--lib/asn1/test/asn1_SUITE_data/InfObj.asn20
-rw-r--r--lib/asn1/test/testInfObj.erl3
2 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 9dbee3f516..10d0040a26 100644
--- a/lib/asn1/test/asn1_SUITE_data/InfObj.asn
+++ b/lib/asn1/test/asn1_SUITE_data/InfObj.asn
@@ -404,6 +404,26 @@ id-at OBJECT IDENTIFIER ::= { 2 5 4 41 }
id-at-name AttributeType ::= id-at
at-name ATTRIBUTE ::= { &Type PrintableString, &id id-at-name }
+--
+-- Test using an alias for TYPE-IDENTIFIER.
+--
+
+TiAliasParameterized { TI-ALIAS:InfoObjectSet } ::= SEQUENCE {
+ algorithm TI-ALIAS.&id({InfoObjectSet}),
+ parameters TI-ALIAS.&Type({InfoObjectSet} {@algorithm}) OPTIONAL
+}
+
+TI-ALIAS ::= TYPE-IDENTIFIER
+
+TiAliasSeq ::= SEQUENCE {
+ prf TiAliasParameterized {{TiAliasSet}}
+}
+
+TiAliasSet TI-ALIAS ::= {
+ {NULL IDENTIFIED BY {2 1 2}},
+ ...
+}
+
END
diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl
index 09fe549f0d..accdcf8dff 100644
--- a/lib/asn1/test/testInfObj.erl
+++ b/lib/asn1/test/testInfObj.erl
@@ -153,6 +153,9 @@ main(_Erule) ->
roundtrip('InfObj', 'Rdn', {'Rdn',{2,5,4,41},"abc"}),
+ roundtrip('InfObj', 'TiAliasSeq',
+ {'TiAliasSeq',{'TiAliasSeq_prf',{2,1,2},'NULL'}}),
+
ok.
test_objset(Type, Keys) ->