diff options
author | Björn Gustavsson <[email protected]> | 2014-04-28 12:25:22 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-06-05 13:46:27 +0200 |
commit | 739ad067cf8775558fade616353f44d49a13a487 (patch) | |
tree | ddb83e2af2a8e069eb53260418e13e1521c6112c /lib/asn1/src | |
parent | 7929b72efed6b2f5dee18a0b758ae4d6f001f054 (diff) | |
download | otp-739ad067cf8775558fade616353f44d49a13a487.tar.gz otp-739ad067cf8775558fade616353f44d49a13a487.tar.bz2 otp-739ad067cf8775558fade616353f44d49a13a487.zip |
Correct OCTET STRING default when legacy_erlang_types is active
The default value for an OCTET STRING when legacy_erlang_types was
active would be a binary instead of a list.
Diffstat (limited to 'lib/asn1/src')
-rw-r--r-- | lib/asn1/src/asn1ct_gen.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl index 149813c3aa..c6561bcdb4 100644 --- a/lib/asn1/src/asn1ct_gen.erl +++ b/lib/asn1/src/asn1ct_gen.erl @@ -1378,6 +1378,11 @@ conform_value(#type{def={'BIT STRING',[]}}, Bs) -> bitstring when is_bitstring(Bs) -> Bs end; +conform_value(#type{def='OCTET STRING'}, String) -> + case asn1ct:use_legacy_types() of + false -> String; + true -> binary_to_list(String) + end; conform_value(_, Value) -> Value. named_bitstring_value(List, Names) -> |