0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Add asn1 to the list of applications to be started for SSL

Required since R16B01. And apparently needed in some cases before.
This commit is contained in:
Loïc Hoguin 2013-06-20 15:24:36 +02:00
parent 2923de944f
commit fdf2bc93f6
3 changed files with 6 additions and 1 deletions

View file

@ -15,7 +15,7 @@ environment this means that they need to be started with the
application is started. application is started.
The `cowboy` application also uses the Erlang applications The `cowboy` application also uses the Erlang applications
`public_key` and `ssl` when listening for HTTPS connections. `asn1`, `public_key` and `ssl` when listening for HTTPS connections.
These are started automatically if they weren't before. These are started automatically if they weren't before.
Environment Environment

View file

@ -216,6 +216,7 @@ init_per_group(https, Config) ->
Transport = ranch_ssl, Transport = ranch_ssl,
{_, Cert, Key} = ct_helper:make_certs(), {_, Cert, Key} = ct_helper:make_certs(),
Opts = [{cert, Cert}, {key, Key}], Opts = [{cert, Cert}, {key, Key}],
application:start(asn1),
application:start(public_key), application:start(public_key),
application:start(ssl), application:start(ssl),
{ok, _} = cowboy:start_https(https, 100, Opts ++ [{port, 0}], [ {ok, _} = cowboy:start_https(https, 100, Opts ++ [{port, 0}], [
@ -243,6 +244,7 @@ init_per_group(https_compress, Config) ->
Transport = ranch_ssl, Transport = ranch_ssl,
{_, Cert, Key} = ct_helper:make_certs(), {_, Cert, Key} = ct_helper:make_certs(),
Opts = [{cert, Cert}, {key, Key}], Opts = [{cert, Cert}, {key, Key}],
application:start(asn1),
application:start(public_key), application:start(public_key),
application:start(ssl), application:start(ssl),
{ok, _} = cowboy:start_https(https_compress, 100, Opts ++ [{port, 0}], [ {ok, _} = cowboy:start_https(https_compress, 100, Opts ++ [{port, 0}], [
@ -307,6 +309,7 @@ end_per_group(Name, _) when Name =:= https; Name =:= https_compress ->
cowboy:stop_listener(Name), cowboy:stop_listener(Name),
application:stop(ssl), application:stop(ssl),
application:stop(public_key), application:stop(public_key),
application:stop(asn1),
ok; ok;
end_per_group(Name, _) -> end_per_group(Name, _) ->
cowboy:stop_listener(Name), cowboy:stop_listener(Name),

View file

@ -42,6 +42,7 @@ init_per_suite(Config) ->
application:start(crypto), application:start(crypto),
application:start(ranch), application:start(ranch),
application:start(cowboy), application:start(cowboy),
application:start(asn1),
application:start(public_key), application:start(public_key),
application:start(ssl), application:start(ssl),
Dir = ?config(priv_dir, Config) ++ "/static", Dir = ?config(priv_dir, Config) ++ "/static",
@ -53,6 +54,7 @@ end_per_suite(Config) ->
ct_helper:delete_static_dir(Dir), ct_helper:delete_static_dir(Dir),
application:stop(ssl), application:stop(ssl),
application:stop(public_key), application:stop(public_key),
application:stop(asn1),
application:stop(cowboy), application:stop(cowboy),
application:stop(ranch), application:stop(ranch),
application:stop(crypto), application:stop(crypto),