diff options
author | Ingela Anderton Andin <[email protected]> | 2017-03-08 10:39:22 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-03-08 10:39:22 +0100 |
commit | 70d003ddaecfc290cee565920b89579417c34f9a (patch) | |
tree | a0bb6492a867bf61a8d43a3baec570aa29c08a06 /lib/ssl/src/dtls_socket.erl | |
parent | 0fe6927bf752226270b191282375a031768d8be3 (diff) | |
parent | 000f557f87eb80d3f7c7b57adacd016986117f81 (diff) | |
download | otp-70d003ddaecfc290cee565920b89579417c34f9a.tar.gz otp-70d003ddaecfc290cee565920b89579417c34f9a.tar.bz2 otp-70d003ddaecfc290cee565920b89579417c34f9a.zip |
Merge branch 'ingela/ssl/dtls-cont' into maint
* ingela/ssl/dtls-cont:
dtls: Only test this for TLS for now
dtls: Avoid mixup of protocol to test
dtls: 'dtlsv1.2' corresponds to 'tlsv1.2'
dtls: Correct dialyzer spec and postpone inclusion of test
dtls: Erlang distribution over DTLS is not supported
dtls: Enable some DTLS tests in ssl_to_openssl_SUITE
dtls: Enable DTLS test in ssl_certificate_verify_SUITE
dtls: Hibernation and retransmit timers
dtls: Make sure retransmission timers are run
dtls: DTLS specific handling of socket and ciphers
Diffstat (limited to 'lib/ssl/src/dtls_socket.erl')
-rw-r--r-- | lib/ssl/src/dtls_socket.erl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ssl/src/dtls_socket.erl b/lib/ssl/src/dtls_socket.erl index 570b3ae83a..ac1a7b37c6 100644 --- a/lib/ssl/src/dtls_socket.erl +++ b/lib/ssl/src/dtls_socket.erl @@ -71,11 +71,14 @@ connect(Address, Port, #config{transport_info = {Transport, _, _, _} = CbInfo, close(gen_udp, {_Client, _Socket}) -> ok. +socket(Pid, gen_udp = Transport, {{_, _}, Socket}, ConnectionCb) -> + #sslsocket{pid = Pid, + %% "The name "fd" is keept for backwards compatibility + fd = {Transport, Socket, ConnectionCb}}; socket(Pid, Transport, Socket, ConnectionCb) -> #sslsocket{pid = Pid, %% "The name "fd" is keept for backwards compatibility - fd = {Transport, Socket, ConnectionCb}}. - + fd = {Transport, Socket, ConnectionCb}}. %% Vad göra med emulerade setopts(gen_udp, #sslsocket{pid = {Socket, _}}, Options) -> {SockOpts, _} = tls_socket:split_options(Options), @@ -108,11 +111,15 @@ getstat(gen_udp, {_,Socket}, Options) -> inet:getstat(Socket, Options); getstat(Transport, Socket, Options) -> Transport:getstat(Socket, Options). +peername(udp, _) -> + {error, enotconn}; peername(gen_udp, {_, {Client, _Socket}}) -> {ok, Client}; peername(Transport, Socket) -> Transport:peername(Socket). -sockname(gen_udp, {_,Socket}) -> +sockname(gen_udp, {_, {_,Socket}}) -> + inet:sockname(Socket); +sockname(gen_udp, Socket) -> inet:sockname(Socket); sockname(Transport, Socket) -> Transport:sockname(Socket). |