aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_test_lib.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-08-31 15:12:41 +0200
committerIngela Anderton Andin <[email protected]>2010-08-31 15:12:41 +0200
commitcdf4fceaf40ddd00fa2d54d398828f0a4def1d70 (patch)
tree2a94ac05abd324db4113f726ad95994c138936a8 /lib/ssl/test/ssl_test_lib.erl
parent82d430853eb1f53e6022de647c26254fe5681454 (diff)
parent1c3ed28fc20b64a8419a939c7417000be1e63c5c (diff)
downloadotp-cdf4fceaf40ddd00fa2d54d398828f0a4def1d70.tar.gz
otp-cdf4fceaf40ddd00fa2d54d398828f0a4def1d70.tar.bz2
otp-cdf4fceaf40ddd00fa2d54d398828f0a4def1d70.zip
Merge branch 'ia/test-crypto-bug' into dev
* ia/test-crypto-bug: Add tests for crypto RC4 bug
Diffstat (limited to 'lib/ssl/test/ssl_test_lib.erl')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl17
1 files changed, 17 insertions, 0 deletions
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.