<div dir="ltr">Matt,<br>Sorry for the confusion. In the first (correct) trace the client is BoringSSL (webrtc) and the server hello comes from Janus (OpenSSL). In the bad trace the Client is openSSL and the server is BoringSSL. The error almost always seems to happen in this configuration (when client == openSSL, Server == BoringSSL)<div><br></div><div>So im guessing the client hello is different since it comes from boring SSL.</div><div><br></div><div>I'm currently testing janus with both 1.0.1m and BoringSSL (same version as webrtc/chrome M43). I'll post my results if it doesnt end up in the same state in a few days as I get some testing on these servers!</div><div><br></div><div>This has been amazing helpful. OpenSSL seems DTLS handshakes seem so easy :) I cant believe theres a SSL_do_handshake() function!</div><div><br></div><div>Thank you!</div><div><br><div><br></div><div><br></div></div></div><br><div class="gmail_quote">On Fri, May 1, 2015 at 3:41 PM Matt Caswell <<a href="mailto:matt@openssl.org">matt@openssl.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 01/05/15 02:11, faraz khan wrote:<br>
> Hi everyone,<br>
> This is my first time posting to this list - so if theres a better place<br>
> for this question please let me know.<br>
><br>
> The problem I'm trying to fix applies to the Janus webrtc gateway<br>
> (<a href="https://github.com/meetecho/janus-gateway" target="_blank">https://github.com/meetecho/janus-gateway</a>) and my application which is<br>
> using native C++ webrtc.<br>
><br>
> What happens is that after hundreds of successful connections, sometimes<br>
> the Janus server is unable to negotiate a DTLS handshake and after a key<br>
> exchange the webrtc client replied with a DTLS Alert: Decrypt failed<br>
> message. I'm attaching a wireshark trace of the issue happening and one<br>
> for the correct negotiation.<br>
<br>
Can you confirm that the trace you attached for the correct negotiation<br>
also came from Janus? I spotted some odd things about the extensions in<br>
the ClientHello:<br>
<br>
It has the "extended master secret" extension. That extension is not<br>
supported by any released version of OpenSSL (we have it in the dev<br>
version of 1.1.0 - but that is unreleased).<br>
<br>
It correctly adds the ec_point_formats and elliptic_curves extensions.<br>
However it so happens that OpenSSL 1.0.1f has a bug in it (not in the<br>
latest version) which suppresses those extensions for DTLS (this is a<br>
significant enough bug in itself that it is worthwhile upgrading your<br>
OpenSSL)<br>
<br>
OpenSSL always adds extensions in the same order - and these extensions<br>
are in a different order.<br>
<br>
Due to the above it looks to me like the OpenSSL DTLS stack was not used<br>
to generate that ClientHello. The failed one *does* look like an OpenSSL<br>
generated ClientHello.<br>
<br>
Matt<br>
<br>
_______________________________________________<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
</blockquote></div>