Reformat code

This commit is contained in:
Maciej Szlosarczyk 2019-07-29 11:25:16 +03:00
parent 8afbf22540
commit 0231aae270
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
3 changed files with 11 additions and 11 deletions

View file

@ -82,10 +82,12 @@ request_from_map(#{command := Command,
%% Return form data or an empty list.
request_body(?helloCommand, _, _) -> "";
request_body(_Command, RawFrame, nomatch) ->
{multipart, [{<<"raw_frame">>, RawFrame}, {<<"frame">>, RawFrame}]};
{multipart,
[{<<"raw_frame">>, RawFrame}, {<<"frame">>, RawFrame}]};
request_body(_Command, RawFrame, ClTRID) ->
{multipart,
[{<<"raw_frame">>, RawFrame}, {<<"frame">>, RawFrame}, {<<"clTRID">>, ClTRID}]}.
[{<<"raw_frame">>, RawFrame}, {<<"frame">>, RawFrame},
{<<"clTRID">>, ClTRID}]}.
%% Return a list of properties that each represent a query part in a query string.
%% [{"user", "eis"}]} becomes later https://example.com?user=eis

View file

@ -44,7 +44,6 @@ start_link(Socket) ->
%% mod_epp does exactly the same thing.
handle_cast(serve, State = #state{socket = Socket}) ->
{ok, {PeerIp, _PeerPort}} = ssl:peername(Socket),
case ssl:handshake(Socket) of
{ok, SecureSocket} ->
NewState = state_from_socket(SecureSocket, State),
@ -52,7 +51,6 @@ handle_cast(serve, State = #state{socket = Socket}) ->
{error, Error} ->
log_on_invalid_handshake(PeerIp, Error)
end;
%% Step two: Using the state of the connection, get the hello route
%% from http server. Send the response from HTTP server back to EPP
%% client. When this succeeds, send "process_command" to self and
@ -169,7 +167,8 @@ log_on_timeout(State) ->
log_on_invalid_handshake(Ip, Error) ->
ReadableIp = epp_util:readable_ip(Ip),
lager:info("Failed SSL handshake. IP: ~s, Error: [~p]~n",
lager:info("Failed SSL handshake. IP: ~s, Error: "
"[~p]~n",
[ReadableIp, Error]),
exit(normal).

View file

@ -179,7 +179,6 @@ error_test_case(Config) ->
revoked_cert_test_case(Config) ->
Options = proplists:get_value(revoked_options, Config),
{error, Error} = ssl:connect("localhost", 1443, Options, 2000),
ct:pal("~p", [Error]),
{tls_alert,
{certificate_revoked,
"received CLIENT ALERT: Fatal - Certificate Revoked"}} = Error,