From 1c3ed28fc20b64a8419a939c7417000be1e63c5c Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 24 Aug 2010 11:05:28 +0200 Subject: Add tests for crypto RC4 bug Changed test so that the test cases testing all different ciphers also sends data so that that the calls to crypto cipher functions are also tested. --- lib/ssl/test/ssl_test_lib.erl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/ssl/test/ssl_test_lib.erl') diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl index c7ff015034..c35178460f 100644 --- a/lib/ssl/test/ssl_test_lib.erl +++ b/lib/ssl/test/ssl_test_lib.erl @@ -623,3 +623,20 @@ pem_to_der(File) -> der_to_pem(File, Entries) -> PemBin = public_key:pem_encode(Entries), file:write_file(File, PemBin). + +cipher_result(Socket, Result) -> + Result = ssl:connection_info(Socket), + test_server:format("Successfull connect: ~p~n", [Result]), + %% Importante to send two packets here + %% to properly test "cipher state" handling + ssl:send(Socket, "Hello\n"), + receive + {ssl, Socket, "Hello\n"} -> + ssl:send(Socket, " world\n"), + receive + {ssl, Socket, " world\n"} -> + ok + end; + Other -> + {unexpected, Other} + end. -- cgit v1.2.3