Commits

Oscar Hellström committed 51733df

Add dependencies to crypto/ssl and make sure ssl is seeded.

Comments (0)

Files changed (3)

src/lhttpc.app.src

         {vsn, "@VSN@"},
         {modules, [@MODULES@]},
         {registered, [lhttpc_manager]},
-        {applications, [kernel, stdlib]},
+        {applications, [kernel, stdlib, ssl, crypto]},
   {mod, {lhttpc, nil}},
   {env, [{connection_timeout, 300000}]}
  ]}.
 -spec start(normal | {takeover, node()} | {failover, node()}, any()) ->
     {ok, pid()}.
 start(_, _) ->
+	% Make sure that the ssl random number generator is seeded
+	ssl:seed(crypto:rand_bytes(255)),
     lhttpc_sup:start_link().
 
 %% @hidden

test/lhttpc_tests.erl

 %%% Eunit setup stuff
 
 start_app() ->
+	ok = application:start(crypto),
+	ok = application:start(ssl),
     ok = application:start(lhttpc).
 
 stop_app(_) ->
-    ok = application:stop(lhttpc).
+    ok = application:stop(lhttpc),
+	ok = application:stop(ssl),
+	ok = application:stop(crypto).
 
 tcp_test_() ->
     {setup, fun start_app/0, fun stop_app/1, [