aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_handshake.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-05-28 06:47:01 +0000
committerErlang/OTP <[email protected]>2010-05-28 06:47:01 +0000
commit47be58961af29d665f91d8702c80a70ee43a33ed (patch)
tree00483d45af0ca92e03368f0b20654cfa335cb83f /lib/ssl/src/ssl_handshake.erl
parent2e57f3b4a0cd9815337eb908ac24189b17648c4a (diff)
downloadotp-47be58961af29d665f91d8702c80a70ee43a33ed.tar.gz
otp-47be58961af29d665f91d8702c80a70ee43a33ed.tar.bz2
otp-47be58961af29d665f91d8702c80a70ee43a33ed.zip
Added misssing version check for client.
Diffstat (limited to 'lib/ssl/src/ssl_handshake.erl')
-rw-r--r--lib/ssl/src/ssl_handshake.erl27
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index 5f3dff8894..9ecd667e69 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -128,17 +128,22 @@ hello(#server_hello{cipher_suite = CipherSuite, server_version = Version,
session_id = SessionId, renegotiation_info = Info},
#ssl_options{secure_renegotiate = SecureRenegotation},
ConnectionStates0, Renegotiation) ->
-
- case handle_renegotiation_info(client, Info, ConnectionStates0,
- Renegotiation, SecureRenegotation, []) of
- {ok, ConnectionStates1} ->
- ConnectionStates =
- hello_pending_connection_states(client, CipherSuite, Random,
- Compression, ConnectionStates1),
- {Version, SessionId, ConnectionStates};
- #alert{} = Alert ->
- Alert
- end;
+
+ case ssl_record:is_acceptable_version(Version) of
+ true ->
+ case handle_renegotiation_info(client, Info, ConnectionStates0,
+ Renegotiation, SecureRenegotation, []) of
+ {ok, ConnectionStates1} ->
+ ConnectionStates =
+ hello_pending_connection_states(client, CipherSuite, Random,
+ Compression, ConnectionStates1),
+ {Version, SessionId, ConnectionStates};
+ #alert{} = Alert ->
+ Alert
+ end;
+ false ->
+ ?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
+ end.
hello(#client_hello{client_version = ClientVersion, random = Random,
cipher_suites = CipherSuites,