From 7d2eb972950b0c331661d2a1dbbce9ddb63833a6 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Thu, 31 Jul 2014 17:47:00 -0400 Subject: [PATCH] Bug 996237 - Check for DHE negotiation failure. r=ekr --- media/mtransport/test/transport_unittests.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/media/mtransport/test/transport_unittests.cpp b/media/mtransport/test/transport_unittests.cpp index b15ce2a2a27d..bb3ba1009b3f 100644 --- a/media/mtransport/test/transport_unittests.cpp +++ b/media/mtransport/test/transport_unittests.cpp @@ -876,6 +876,17 @@ TEST_F(TransportTest, TestSrtpMismatch) { ASSERT_EQ(0, p2_->srtpCipher()); } +// NSS doesn't support DHE suites on the server end. +// This checks to see if we barf when that's the only option available. +TEST_F(TransportTest, TestDheOnlyFails) { + SetDtlsPeer(); + + // p2_ is the client + // setting this on p1_ (the server) causes NSS to assert + ConfigureOneCipher(p2_, TLS_DHE_RSA_WITH_AES_128_CBC_SHA); + ConnectSocketExpectFail(); +} + TEST(PushTests, LayerFail) { mozilla::RefPtr flow = new TransportFlow(); nsresult rv;