aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-05-23 16:44:58 +0200
committerPéter Dimitrov <[email protected]>2018-06-20 15:18:37 +0200
commit6e0ee7a598c892b6db3282bd719583b68f2d8a89 (patch)
treee1f2b6d3dfa9592e16a621240cf0c2c10719aa94 /lib/ssl/src/ssl.erl
parentaa09b1326a0e88937a3e5c0162bed4cd7d73b4bd (diff)
downloadotp-6e0ee7a598c892b6db3282bd719583b68f2d8a89.tar.gz
otp-6e0ee7a598c892b6db3282bd719583b68f2d8a89.tar.bz2
otp-6e0ee7a598c892b6db3282bd719583b68f2d8a89.zip
ssl: Add logging for TLS record protocol
Change-Id: I18786a9a8523d0ec3d9ca37ad5b2284721c5c4a1
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r--lib/ssl/src/ssl.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
index a93695fb7a..592c02a28c 100644
--- a/lib/ssl/src/ssl.erl
+++ b/lib/ssl/src/ssl.erl
@@ -210,6 +210,8 @@ ssl_accept(Socket, SslOptions, Timeout) ->
%% Description: Performs accept on an ssl listen socket. e.i. performs
%% ssl handshake.
%%--------------------------------------------------------------------
+
+%% Performs the SSL/TLS/DTLS server-side handshake.
handshake(ListenSocket) ->
handshake(ListenSocket, infinity).
@@ -217,6 +219,12 @@ handshake(#sslsocket{} = Socket, Timeout) when (is_integer(Timeout) andalso Tim
(Timeout == infinity) ->
ssl_connection:handshake(Socket, Timeout);
+%% If Socket is a ordinary socket(): upgrades a gen_tcp, or equivalent, socket to
+%% an SSL socket, that is, performs the SSL/TLS server-side handshake and returns
+%% the SSL socket.
+%%
+%% If Socket is an sslsocket(): provides extra SSL/TLS/DTLS options to those
+%% specified in ssl:listen/2 and then performs the SSL/TLS/DTLS handshake.
handshake(ListenSocket, SslOptions) when is_port(ListenSocket) ->
handshake(ListenSocket, SslOptions, infinity).