aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_handshake.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-09-10 17:43:40 +0200
committerIngela Anderton Andin <[email protected]>2013-12-02 09:44:49 +0100
commit810c34a7991f2b6edd5e9f41e3c667958a5b2bc8 (patch)
tree650dfd13ab00533b8a1cc8f3f63986c672558667 /lib/ssl/src/dtls_handshake.erl
parent2bc1b1c962adf7849abb5a8399706aad708c5969 (diff)
downloadotp-810c34a7991f2b6edd5e9f41e3c667958a5b2bc8.tar.gz
otp-810c34a7991f2b6edd5e9f41e3c667958a5b2bc8.tar.bz2
otp-810c34a7991f2b6edd5e9f41e3c667958a5b2bc8.zip
ssl: Refactor handshake and record handling
Diffstat (limited to 'lib/ssl/src/dtls_handshake.erl')
-rw-r--r--lib/ssl/src/dtls_handshake.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ssl/src/dtls_handshake.erl b/lib/ssl/src/dtls_handshake.erl
index d0f9649f9f..d898da65fb 100644
--- a/lib/ssl/src/dtls_handshake.erl
+++ b/lib/ssl/src/dtls_handshake.erl
@@ -87,11 +87,6 @@ hello(Address, Port,
{reply, HelloVerifyRequest}
end.
-address_to_bin({A,B,C,D}, Port) ->
- <<0:80,16#ffff:16,A,B,C,D,Port:16>>;
-address_to_bin({A,B,C,D,E,F,G,H}, Port) ->
- <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16,Port:16>>.
-
%%--------------------------------------------------------------------
encode_handshake(Package, Version, MsgSeq, Mss) ->
{MsgType, Bin} = enc_hs(Package, Version),
@@ -426,3 +421,8 @@ decode_handshake(_Version, ?HELLO_VERIFY_REQUEST, <<?BYTE(Major), ?BYTE(Minor),
cookie = Cookie};
decode_handshake(Version, Tag, Msg) ->
ssl_handshake:decode_handshake(Version, Tag, Msg).
+
+address_to_bin({A,B,C,D}, Port) ->
+ <<0:80,16#ffff:16,A,B,C,D,Port:16>>;
+address_to_bin({A,B,C,D,E,F,G,H}, Port) ->
+ <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16,Port:16>>.