aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_record.erl
diff options
context:
space:
mode:
authorAndreas Schultz <[email protected]>2016-01-07 14:03:24 +0100
committerIngela Anderton Andin <[email protected]>2016-06-13 22:24:14 +0200
commit62bca08d3c1c380ad473796ed0d80e97bd3d9265 (patch)
tree3adabf07e6c3d8ff35227f9fa34682e114a8d0f8 /lib/ssl/src/dtls_record.erl
parent54b59a6270355787700d06de619735a4c4240608 (diff)
downloadotp-62bca08d3c1c380ad473796ed0d80e97bd3d9265.tar.gz
otp-62bca08d3c1c380ad473796ed0d80e97bd3d9265.tar.bz2
otp-62bca08d3c1c380ad473796ed0d80e97bd3d9265.zip
dtls: rework handshake flight encodeing
The MSS might change between sending the a flight and possible resend. We therefore have to be able to fragment the records differently for resent. Encoding and fragmenting of handshake record therefor needs to be done independently. With this change the handshake is encoded to it's full length first, then queued to a flight. The fragmentation is handled during assembly of the flights datagram. Conflicts: lib/ssl/src/dtls_connection.erl
Diffstat (limited to 'lib/ssl/src/dtls_record.erl')
-rw-r--r--lib/ssl/src/dtls_record.erl10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/ssl/src/dtls_record.erl b/lib/ssl/src/dtls_record.erl
index e79e1cede0..ed8024d892 100644
--- a/lib/ssl/src/dtls_record.erl
+++ b/lib/ssl/src/dtls_record.erl
@@ -36,7 +36,7 @@
-export([decode_cipher_text/2]).
%% Encoding
--export([encode_plain_text/4, encode_handshake/3, encode_change_cipher_spec/2]).
+-export([encode_plain_text/4, encode_change_cipher_spec/2]).
%% Protocol version handling
-export([protocol_version/1, lowest_protocol_version/2, lowest_protocol_version/1,
@@ -208,14 +208,6 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
false ->
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
end.
-%%--------------------------------------------------------------------
--spec encode_handshake(iolist(), dtls_version(), #connection_states{}) ->
- {iolist(), #connection_states{}}.
-%%
-%% Description: Encodes a handshake message to send on the ssl-socket.
-%%--------------------------------------------------------------------
-encode_handshake(Frag, Version, ConnectionStates) ->
- encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates).
%%--------------------------------------------------------------------
-spec encode_change_cipher_spec(dtls_version(), #connection_states{}) ->