[erlang-questions] dtls error when used with chrome webrtc

Joe K goodjoe2049@REDACTED
Wed Dec 27 22:09:19 CET 2017


I'm trying to implement parts of webrtc stack with elixir/erlang and
currently am stuck with setting up a dtls session.

The minimal example is, I think, the following (in console, erlang 20.2.2):

    2> ssl:start().
    ok
    3> {ok, ListenSocket} = ssl:listen(8090, [
    3>   binary,
    3>   {ip, {0, 0, 0, 0}},
    3>   {protocol, dtls},
    3>   {keyfile, <<"priv/server.key">>},
    3>   {certfile, <<"priv/server.pem">>},
    3>   {active, false}
    3> ]).
    {ok, ...}
    4> {ok, AcceptSocket} = ssl:transport_accept(ListenSocket).
    {ok,...}
    5> ssl:ssl_accept(AcceptSocket).
    {error,{tls_alert,"record overflow"}}

And js (with chrome canary):
https://gist.github.com/idi-ot/a07b7330ff02f90373a2dcfe83883afa

After {error,{tls_alert,"record overflow"}} the RTCPeerConnection's
iceConnectionState becomes "failed" and the connection itself "closed".

I wonder what I am doing wrong.

    openssl s_client -dtls1 -connect 127.0.0.1:8089 -debug

works fine with the code snippet above.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171228/614f16c9/attachment.htm>


More information about the erlang-questions mailing list