diff options
author | Kenneth Lundin <[email protected]> | 2011-05-19 17:59:41 +0200 |
---|---|---|
committer | Kenneth Lundin <[email protected]> | 2011-05-19 17:59:41 +0200 |
commit | 38a2271e2474c83ffbc6ed6a3f601cf873cb1699 (patch) | |
tree | 851df39509cf712d548157b780671df33f1dec2d /lib/asn1/src | |
parent | c666fa93b12399a0160b6bfedf002eacbc2f01e2 (diff) | |
download | otp-38a2271e2474c83ffbc6ed6a3f601cf873cb1699.tar.gz otp-38a2271e2474c83ffbc6ed6a3f601cf873cb1699.tar.bz2 otp-38a2271e2474c83ffbc6ed6a3f601cf873cb1699.zip |
Corrected handling of long length in driver and updated test suites
Diffstat (limited to 'lib/asn1/src')
-rw-r--r-- | lib/asn1/src/asn1ct_constructed_per.erl | 9 | ||||
-rw-r--r-- | lib/asn1/src/asn1ct_value.erl | 4 | ||||
-rw-r--r-- | lib/asn1/src/asn1rt_check.erl | 4 |
3 files changed, 11 insertions, 6 deletions
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl index d6f23aca06..c1b6aa5713 100644 --- a/lib/asn1/src/asn1ct_constructed_per.erl +++ b/lib/asn1/src/asn1ct_constructed_per.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -255,7 +255,7 @@ gen_decode_constructed(Erules,Typename,D) when is_record(D,type) -> _ -> false end end, - case lists:any(F,CompList) of + case lists:any(F,flat_complist(CompList)) of true -> % when component relation constraint establish %% relation from a component to another components %% subtype component @@ -1493,6 +1493,11 @@ emit_extaddgroupTerms(VarSeries,[_|Rest]) -> emit_extaddgroupTerms(VarSeries,Rest); emit_extaddgroupTerms(_,[]) -> ok. + +flat_complist({Rl1,El,Rl2}) -> Rl1 ++ El ++ Rl2; +flat_complist({Rl,El}) -> Rl ++ El; +flat_complist(CompList) -> CompList. + wrap_compList({Root1,Ext,Root2}) -> {Root1,wrap_extensionAdditionGroups(Ext),Root2}; wrap_compList({Root1,Ext}) -> diff --git a/lib/asn1/src/asn1ct_value.erl b/lib/asn1/src/asn1ct_value.erl index d9a7e5374a..693e039a13 100644 --- a/lib/asn1/src/asn1ct_value.erl +++ b/lib/asn1/src/asn1ct_value.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2009. All Rights Reserved. +%% Copyright Ericsson AB 1997-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -443,7 +443,7 @@ open_type_value(ber_bin_v2) -> open_type_value(per) -> "\n\topen_type"; %octet string value "open_type" open_type_value(per_bin) -> - "\n\topen_type"; + <<"\n\topen_type">>; % <<10,9,111,112,101,110,95,116,121,112,101>>; open_type_value(_) -> [4,9,111,112,101,110,95,116,121,112,101]. diff --git a/lib/asn1/src/asn1rt_check.erl b/lib/asn1/src/asn1rt_check.erl index 59a74a7078..24a2a3802d 100644 --- a/lib/asn1/src/asn1rt_check.erl +++ b/lib/asn1/src/asn1rt_check.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -311,7 +311,7 @@ transform_to_EXTERNAL1990([Data_val_desc,Data_value],Acc) when is_list(Data_valu Data_val_desc|Acc])); transform_to_EXTERNAL1990([Data_val_desc,Data_value],Acc) when is_binary(Data_value)-> - list_to_tuple(lists:reverse([{'octet-aligned',binary_to_list(Data_value)}, + list_to_tuple(lists:reverse([{'single-ASN1-type',Data_value}, Data_val_desc|Acc])); transform_to_EXTERNAL1990([Data_value],Acc) when is_list(Data_value)-> list_to_tuple(lists:reverse([{'octet-aligned',Data_value}|Acc])). |