aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_value.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-01-29 10:50:21 +0100
committerBjörn Gustavsson <[email protected]>2014-01-29 10:50:21 +0100
commit228ef1c22ee2f6f39183091aa70f17417c3d9aa6 (patch)
tree7d2203d6df886ce1d7f2344dbfd3e6ec7c8a5c3d /lib/asn1/src/asn1ct_value.erl
parentae2c2f1d838b523939b586014ceb66c2970b8cf2 (diff)
parentd16a480a43a858d604d1ac8d644589be3f49dda1 (diff)
downloadotp-228ef1c22ee2f6f39183091aa70f17417c3d9aa6.tar.gz
otp-228ef1c22ee2f6f39183091aa70f17417c3d9aa6.tar.bz2
otp-228ef1c22ee2f6f39183091aa70f17417c3d9aa6.zip
Merge branch 'bjorn/asn1/erlang-types/OTP-11594'
* bjorn/asn1/erlang-types/OTP-11594: Update documentation Fix open types Fix OCTET STRING Fix BIT STRING Add legacy_erlang_types asn1 test suite: Modernize testTimer_* and testTimer.erl testPrimStrings: Run test of fragmented strings for PER too
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' ->