aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-05-24 16:52:35 +0200
committerIngela Anderton Andin <[email protected]>2016-06-01 10:21:07 +0200
commit9e296281906abf710c4bc7daba05f79bde556f9f (patch)
treebad33ea92bbcd4be5f4f4d2600dd85a0ae376db2 /lib/ssl
parent4eca51173ff1f3404a00c8f52970acb12476b9bb (diff)
downloadotp-9e296281906abf710c4bc7daba05f79bde556f9f.tar.gz
otp-9e296281906abf710c4bc7daba05f79bde556f9f.tar.bz2
otp-9e296281906abf710c4bc7daba05f79bde556f9f.zip
ssl: Handle freebsd OpenSSL flavour
The selection of CA cert files in ssl_ECC_SUITE and ssl_test_lib ought to be refactored, it is quite confusing. But use this workaround until we get time to make a refactor.
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ssl/test/ssl_ECC_SUITE.erl b/lib/ssl/test/ssl_ECC_SUITE.erl
index 3a1fd00c06..b8a03f578d 100644
--- a/lib/ssl/test/ssl_ECC_SUITE.erl
+++ b/lib/ssl/test/ssl_ECC_SUITE.erl
@@ -343,6 +343,12 @@ new_ca(FileName, CA, OwnCa) ->
E1 = public_key:pem_decode(P1),
{ok, P2} = file:read_file(OwnCa),
E2 = public_key:pem_decode(P2),
- Pem = public_key:pem_encode(E2 ++E1),
- file:write_file(FileName, Pem),
+ case os:cmd("openssl version") of
+ "OpenSSL 1.0.1p-freebsd" ++ _ ->
+ Pem = public_key:pem_encode(E1 ++E2),
+ file:write_file(FileName, Pem);
+ _ ->
+ Pem = public_key:pem_encode(E2 ++E1),
+ file:write_file(FileName, Pem)
+ end,
FileName.