aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-12-05 18:48:35 +0100
committerAnders Svensson <[email protected]>2011-12-06 19:04:37 +0100
commit5bef23a095dff0e5e0a8662011f0cf312bf67ffc (patch)
tree88a300cbd3c21255686a3675495666fc650b8ce2 /lib
parent1c41ee4a931c2429d35205ae04a27dd92fdd8d5a (diff)
downloadotp-5bef23a095dff0e5e0a8662011f0cf312bf67ffc.tar.gz
otp-5bef23a095dff0e5e0a8662011f0cf312bf67ffc.tar.bz2
otp-5bef23a095dff0e5e0a8662011f0cf312bf67ffc.zip
Ensure that TLS will be available in TLS suite
The existence of openssl is not enough.
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/test/diameter_tls_SUITE.erl18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/diameter/test/diameter_tls_SUITE.erl b/lib/diameter/test/diameter_tls_SUITE.erl
index 7854411d2e..a325ca33eb 100644
--- a/lib/diameter/test/diameter_tls_SUITE.erl
+++ b/lib/diameter/test/diameter_tls_SUITE.erl
@@ -151,16 +151,22 @@ init_per_group(_, Config) ->
end_per_group(_, _) ->
ok.
+%% Shouldn't really have to know about crypto here but 'ok' from
+%% ssl:start() isn't enough to guarantee that TLS is available.
init_per_suite(Config) ->
- case os:find_executable("openssl") of
- false ->
- {skip, no_openssl};
- _ ->
- Config
+ try
+ false /= os:find_executable("openssl")
+ orelse throw({?MODULE, no_openssl}),
+ ok == crypto:start()
+ orelse throw({?MODULE, no_crypto}),
+ Config
+ catch
+ {?MODULE, E} ->
+ {skip, E}
end.
end_per_suite(_Config) ->
- ok.
+ crypto:stop().
%% Testcases to run when services are started and connections
%% established.