<div dir="ltr"><div dir="ltr">
<span class="gmail-pl-en">USE_SRTP</span> is defined in dtls_handshake.hrl [1] but it says it's not supported.<br></div><div>Are there plans to support it?<br></div><div dir="ltr"><br></div><div dir="ltr">[1] <a href="https://github.com/erlang/otp/blob/master/lib/ssl/src/dtls_handshake.hrl#L64">https://github.com/erlang/otp/blob/master/lib/ssl/src/dtls_handshake.hrl#L64</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 1, 2018 at 11:27 AM Ben Browitt <<a href="mailto:ben.browitt@gmail.com">ben.browitt@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>DTLS is missing the use_srtp extension required for DTLS-SRTP [1].</div>What's the best way to add it?<br><div dir="ltr"><br></div><div>We need to encode the extension in ssl_handshake.erl<br></div><div dir="ltr">encode_hello_extensions([use_srtp | Rest], Acc) -><br>    ExtData = <<0,2,0,1,0>>,<br>    Len = byte_size(ExtData),<br>    encode_hello_extensions(Rest, <<?UINT16(?USE_SRTP_EXT), ?UINT16(Len), ExtData/binary, Acc/binary>>).</div><div dir="ltr"><a href="https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.erl#L657" target="_blank">https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.erl#L657</a><br></div><div dir="ltr"><br></div><div dir="ltr">
<div dir="ltr">Define 
USE_SRTP_EXT

in ssl_handshake.hrl<br></div><div dir="ltr">-define(USE_SRTP_EXT, 14).</div>

</div><div dir="ltr"><br></div><div dir="ltr">Add use_srtp to the hello_extensions record:<br></div><div dir="ltr"><a href="https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.hrl#L100" target="_blank">https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.hrl#L100</a></div><div dir="ltr"><br></div><div dir="ltr">Add <span class="m_859870691748305197gmail-pl-en">use_srtp to hello_extensions_list</span> <br></div><div dir="ltr"><a href="https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.erl#L1826" target="_blank">https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.erl#L1826</a></div><div dir="ltr"><br></div><div>Add use_srtp to 
<span class="m_859870691748305197gmail-pl-en">client_hello_extensions</span></div><div dir="ltr"><a href="https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.erl#L968" target="_blank">https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_handshake.erl#L968</a></div><div dir="ltr"><br></div><div dir="ltr">Add use_srtp to the <span class="m_859870691748305197gmail-pl-k">#</span><span class="m_859870691748305197gmail-pl-en">ssl_options</span> record</div><div dir="ltr"><a href="https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_internal.hrl#L111" target="_blank">https://github.com/erlang/otp/blob/master/lib/ssl/src/ssl_internal.hrl#L111</a><br></div><div dir="ltr"><br></div><div dir="ltr">[1] <a href="https://tools.ietf.org/html/rfc5764#section-4.1" target="_blank">https://tools.ietf.org/html/rfc5764#section-4.1</a></div><div dir="ltr"><br></div><div>Thanks<br></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>