aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_value.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-01-21 16:12:46 +0100
committerBjörn Gustavsson <[email protected]>2014-01-24 16:24:56 +0100
commitaaa4ea283b2b7dad74fdcdd5963558e9d03d80b0 (patch)
tree765382e19e86d86a897daec07e7335571285966d /lib/asn1/src/asn1ct_value.erl
parent4bda9201055daf3abbdb5ef48bbdd0efacfd1fbc (diff)
downloadotp-aaa4ea283b2b7dad74fdcdd5963558e9d03d80b0.tar.gz
otp-aaa4ea283b2b7dad74fdcdd5963558e9d03d80b0.tar.bz2
otp-aaa4ea283b2b7dad74fdcdd5963558e9d03d80b0.zip
Fix OCTET STRING
Diffstat (limited to 'lib/asn1/src/asn1ct_value.erl')
-rw-r--r--lib/asn1/src/asn1ct_value.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_value.erl b/lib/asn1/src/asn1ct_value.erl
index 862b3c4ea5..a86c963b9d 100644
--- a/lib/asn1/src/asn1ct_value.erl
+++ b/lib/asn1/src/asn1ct_value.erl
@@ -260,7 +260,11 @@ from_type_prim(M, D) ->
'BOOLEAN' ->
true;
'OCTET STRING' ->
- adjust_list(size_random(C),c_string(C,"OCTET STRING"));
+ S0 = adjust_list(size_random(C), c_string(C, "OCTET STRING")),
+ case M:legacy_erlang_types() of
+ false -> list_to_binary(S0);
+ true -> S0
+ end;
'NumericString' ->
adjust_list(size_random(C),c_string(C,"0123456789"));
'TeletexString' ->