Skip to content

Commit

Permalink
SSL handshake in test
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsumner committed Apr 24, 2020
1 parent 893864e commit 1b12920
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
18 changes: 6 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
language: erlang
otp_release:
- R16B
- R16B03-1
- 17.0
- 17.1
- 18.0
- 18.1
- 18.2.1
- 19.3
- 20.0
before_script:
- "./bootstrap_travis.sh"
script: "./rebar3 eunit"
- 20.3.8
- 21.3
- 22.1
script:
- chmod u+x rebar3
- ./rebar3 do upgrade, compile, xref, dialyzer, eunit
3 changes: 2 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
nowarn_shadow_vars,
warn_unused_import,
{platform_define, "18|19|^2", new_rand},
{platform_define, "^2", ets_ref}
{platform_define, "^2", ets_ref},
{platform_define, "^[2-9][1-9][0-9]*(.?[0-9]*)", deprecated_21}
]}.
{xref_checks, [undefined_function_calls, deprecated_function_calls]}.
{eunit_opts, [verbose]}.
Binary file added rebar3
Binary file not shown.
10 changes: 9 additions & 1 deletion test/ibrowse_test_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@ do_listen(ssl, Port, Opts) ->
do_accept(tcp, Listen_sock) ->
gen_tcp:accept(Listen_sock, ?ACCEPT_TIMEOUT_MS);
do_accept(ssl, Listen_sock) ->
ssl:ssl_accept(Listen_sock, ?ACCEPT_TIMEOUT_MS).
ssl_handshake(Listen_sock, ?ACCEPT_TIMEOUT_MS).

-ifdef(deprecated_21).
ssl_handshake(Socket, Timeout) ->
ssl:handshake(Socket, Timeout).
-else.
ssl_handshake(Socket, Timeout) ->
ssl:ssl_accept(Socket, Timeout).
-endif.

accept_loop(Sock, Sock_type) ->
case do_accept(Sock_type, Sock) of
Expand Down

0 comments on commit 1b12920

Please sign in to comment.