aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_test_lib.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-11-23 14:15:45 +0100
committerIngela Anderton Andin <[email protected]>2011-11-23 16:22:28 +0100
commitfc668fb3dfbdd72d8f0d4e4af4500f070cdeb804 (patch)
tree368359b0974cae5b956ce301c83e863b656fe53a /lib/ssl/test/ssl_test_lib.erl
parentf545894e96d5898285eee8dce812c885cf208fb7 (diff)
downloadotp-fc668fb3dfbdd72d8f0d4e4af4500f070cdeb804.tar.gz
otp-fc668fb3dfbdd72d8f0d4e4af4500f070cdeb804.tar.bz2
otp-fc668fb3dfbdd72d8f0d4e4af4500f070cdeb804.zip
Implementation of 1/n-1 splitting countermeasure Rizzo/Duong-Beast
The code is refactored and improved to make it easier to insert the 1/n-1 splitting countermeasure Rizzo/Duong-Beast that is really done in one function clause in ssl:record_split_bin/3
Diffstat (limited to 'lib/ssl/test/ssl_test_lib.erl')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 46a8112a41..019ea61f37 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -662,6 +662,9 @@ cipher_result(Socket, Result) ->
%% to properly test "cipher state" handling
ssl:send(Socket, "Hello\n"),
receive
+ {ssl, Socket, "H"} ->
+ ssl:send(Socket, " world\n"),
+ receive_rizzo_duong_beast();
{ssl, Socket, "Hello\n"} ->
ssl:send(Socket, " world\n"),
receive
@@ -687,3 +690,16 @@ public_key(#'PrivateKeyInfo'{privateKeyAlgorithm =
public_key:der_decode('DSAPrivateKey', iolist_to_binary(Key));
public_key(Key) ->
Key.
+
+
+receive_rizzo_duong_beast() ->
+ receive
+ {ssl, _, "ello\n"} ->
+ receive
+ {ssl, _, " "} ->
+ receive
+ {ssl, _, "world\n"} ->
+ ok
+ end
+ end
+ end.