aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-05-09 18:30:40 +0200
committerIngela Anderton Andin <[email protected]>2017-05-16 15:13:07 +0200
commit66fd2a8ac224d91226fdf1913da976d5d883b64c (patch)
tree2642220a90d8f5bd28e926556c649519fd711628 /lib/ssl/src/ssl.erl
parent8baada6ba97f7809c99cae4e799fddb273a54882 (diff)
downloadotp-66fd2a8ac224d91226fdf1913da976d5d883b64c.tar.gz
otp-66fd2a8ac224d91226fdf1913da976d5d883b64c.tar.bz2
otp-66fd2a8ac224d91226fdf1913da976d5d883b64c.zip
ssl: Adopt setopts and getopts for DTLS
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r--lib/ssl/src/ssl.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
index d9e47c43ad..5421bdef99 100644
--- a/lib/ssl/src/ssl.erl
+++ b/lib/ssl/src/ssl.erl
@@ -455,7 +455,16 @@ setopts(#sslsocket{pid = Pid}, Options0) when is_pid(Pid), is_list(Options0) ->
_:_ ->
{error, {options, {not_a_proplist, Options0}}}
end;
-
+setopts(#sslsocket{pid = {{udp, _}, #config{transport_info = {Transport,_,_,_}}}} = ListenSocket, Options) when is_list(Options) ->
+ try dtls_socket:setopts(Transport, ListenSocket, Options) of
+ ok ->
+ ok;
+ {error, InetError} ->
+ {error, {options, {socket_options, Options, InetError}}}
+ catch
+ _:Error ->
+ {error, {options, {socket_options, Options, Error}}}
+ end;
setopts(#sslsocket{pid = {_, #config{transport_info = {Transport,_,_,_}}}} = ListenSocket, Options) when is_list(Options) ->
try tls_socket:setopts(Transport, ListenSocket, Options) of
ok ->