From 19ba2747ad5f61c78a60f67aa3836787ba10937f Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 13 Jan 2017 13:37:22 -0800 Subject: [PATCH] update crypto calls for OTP 19 and added to travis otps --- .travis.yml | 1 + test/client_server_SUITE.erl | 2 +- test/flow_control_SUITE.erl | 2 +- test/flow_control_handler.erl | 4 ++-- test/http2_spec_5_5_SUITE.erl | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index faa66a24..ba43bc38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: erlang otp_release: + - 19.2 - 18.2.1 before_script: kerl list installations diff --git a/test/client_server_SUITE.erl b/test/client_server_SUITE.erl index c1d72132..071f8223 100644 --- a/test/client_server_SUITE.erl +++ b/test/client_server_SUITE.erl @@ -208,7 +208,7 @@ echo_body(_Config) -> http2c:send_unaltered_frames(Client, [HeaderFrame]), - Body = crypto:rand_bytes(128), + Body = crypto:strong_rand_bytes(128), BodyFrames = h2_frame_data:to_frames(3, Body, #settings{max_frame_size=64}), http2c:send_unaltered_frames(Client, BodyFrames), diff --git a/test/flow_control_SUITE.erl b/test/flow_control_SUITE.erl index eb5a29c5..b5c4d35f 100644 --- a/test/flow_control_SUITE.erl +++ b/test/flow_control_SUITE.erl @@ -171,7 +171,7 @@ send_n_bytes(N) -> %% window, but not the connections %% So now, send N bytes and we should get some desired error. - Data = crypto:rand_bytes(N), + Data = crypto:strong_rand_bytes(N), Frames = h2_frame_data:to_frames(3, Data, #settings{}), http2c:send_unaltered_frames(Client, Frames), diff --git a/test/flow_control_handler.erl b/test/flow_control_handler.erl index 477cdf44..3612f0ac 100644 --- a/test/flow_control_handler.erl +++ b/test/flow_control_handler.erl @@ -47,8 +47,8 @@ on_request_end_stream(State=#state{conn_pid=ConnPid, {<<":status">>,<<"200">>} ], h2_connection:send_headers(ConnPid, StreamId, ResponseHeaders), - h2_connection:send_body(ConnPid, StreamId, crypto:rand_bytes(?SEND_BYTES), + h2_connection:send_body(ConnPid, StreamId, crypto:strong_rand_bytes(?SEND_BYTES), [{send_end_stream, false}]), timer:sleep(200), - h2_connection:send_body(ConnPid, StreamId, crypto:rand_bytes(?SEND_BYTES)), + h2_connection:send_body(ConnPid, StreamId, crypto:strong_rand_bytes(?SEND_BYTES)), {ok, State}. diff --git a/test/http2_spec_5_5_SUITE.erl b/test/http2_spec_5_5_SUITE.erl index d30e6760..197c08db 100644 --- a/test/http2_spec_5_5_SUITE.erl +++ b/test/http2_spec_5_5_SUITE.erl @@ -28,7 +28,7 @@ sends_unknown_extension_frame(_Config) -> http2c:send_binary(Client, Bin), %% It should be ignored, so let's send a ping and get one back - Data = crypto:rand_bytes(8), + Data = crypto:strong_rand_bytes(8), http2c:send_unaltered_frames( Client, [