diff options
author | Björn Gustavsson <[email protected]> | 2014-10-30 14:12:51 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:26 +0100 |
commit | 5abac511937a99414902d3052fb633e1a65812d3 (patch) | |
tree | 923ba92f5ff7ebe2a71e01f04e694436fe3b6651 /lib/asn1/test | |
parent | d0b902b1909ae6d17fd2548baf0fd95ab44f0631 (diff) | |
download | otp-5abac511937a99414902d3052fb633e1a65812d3.tar.gz otp-5abac511937a99414902d3052fb633e1a65812d3.tar.bz2 otp-5abac511937a99414902d3052fb633e1a65812d3.zip |
Fix instantiation of an inlined type in a value definition
Diffstat (limited to 'lib/asn1/test')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1 | 11 | ||||
-rw-r--r-- | lib/asn1/test/testParamBasic.erl | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1 b/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1 index 8a69a6addd..f175aabd26 100644 --- a/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/ParamBasic.asn1 @@ -61,4 +61,15 @@ Seq ::= SEQUENCE { ObjectSet-1 ALGORITHM-IDENTIFIER ::= { {INTEGER IDENTIFIED BY {2 1 1}}, ... } ObjectSet-2 ALGORITHM-IDENTIFIER ::= { ... } +-- Test a value that uses the instantiation of a parameterized type inline. +-- (Adapted from PKCS-5.) +-- + +algid-hmacWithSHA1 AlgorithmIdentifier2 {{ObjectSet-3}} ::= + {algorithm id-hmacWithSHA1, parameters NULL : NULL} + +ObjectSet-3 TYPE-IDENTIFIER ::= { {NULL IDENTIFIED BY id-hmacWithSHA1} } + +id-hmacWithSHA1 OBJECT IDENTIFIER ::= {2 9 9 9 7} + END diff --git a/lib/asn1/test/testParamBasic.erl b/lib/asn1/test/testParamBasic.erl index 52c6426414..ab5bf70e55 100644 --- a/lib/asn1/test/testParamBasic.erl +++ b/lib/asn1/test/testParamBasic.erl @@ -50,6 +50,9 @@ main(Rules) -> roundtrip('Seq', {'Seq', {'Seq_c1',{2,1,1},42}, {'Seq_c2',{2,1,1,1},asn1_NOVALUE}}), + + {_,{2,9,9,9,7},'NULL'} = 'ParamBasic':'algid-hmacWithSHA1'(), + ok. roundtrip(Type, Value) -> |