Browse Source

Don't attempt to start ssl anymore

Ranch now depends on SSL. Users embedding listeners in
their supervision tree are expected to depend on SSL too
if they are using it.
Loïc Hoguin 8 years ago
parent
commit
94b3770ccf
1 changed files with 0 additions and 10 deletions
  1. 0 10
      src/ranch.erl

+ 0 - 10
src/ranch.erl

@@ -48,8 +48,6 @@ start_listener(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts)
 		when is_integer(NumAcceptors) andalso is_atom(Transport)
 		when is_integer(NumAcceptors) andalso is_atom(Transport)
 		andalso is_atom(Protocol) ->
 		andalso is_atom(Protocol) ->
 	_ = code:ensure_loaded(Transport),
 	_ = code:ensure_loaded(Transport),
-	%% @todo Remove in Ranch 2.0 and simply require ssl.
-	_ = ensure_ssl(Transport),
 	case erlang:function_exported(Transport, name, 0) of
 	case erlang:function_exported(Transport, name, 0) of
 		false ->
 		false ->
 			{error, badarg};
 			{error, badarg};
@@ -103,18 +101,10 @@ stop_listener(Ref) ->
 child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts)
 child_spec(Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts)
 		when is_integer(NumAcceptors) andalso is_atom(Transport)
 		when is_integer(NumAcceptors) andalso is_atom(Transport)
 		andalso is_atom(Protocol) ->
 		andalso is_atom(Protocol) ->
-	%% @todo Remove in Ranch 2.0 and simply require ssl.
-	_ = ensure_ssl(Transport),
 	{{ranch_listener_sup, Ref}, {ranch_listener_sup, start_link, [
 	{{ranch_listener_sup, Ref}, {ranch_listener_sup, start_link, [
 		Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts
 		Ref, NumAcceptors, Transport, TransOpts, Protocol, ProtoOpts
 	]}, permanent, infinity, supervisor, [ranch_listener_sup]}.
 	]}, permanent, infinity, supervisor, [ranch_listener_sup]}.
 
 
-%% @todo Remove in Ranch 2.0 and simply require ssl.
-ensure_ssl(ranch_ssl) ->
-	require([crypto, asn1, public_key, ssl]);
-ensure_ssl(_) ->
-	ok.
-
 -spec accept_ack(ref()) -> ok.
 -spec accept_ack(ref()) -> ok.
 accept_ack(Ref) ->
 accept_ack(Ref) ->
 	receive {shoot, Ref, Transport, Socket, AckTimeout} ->
 	receive {shoot, Ref, Transport, Socket, AckTimeout} ->