Bug 1283085 - Handle new ALPN value r=abr
authorEKR <ekr@rtfm.com>
Wed, 29 Jun 2016 10:24:48 -0700
changeset 303293 06f5fb5ff50017a848bd1993e2725eab24fc772a
parent 303292 09592e523356e034cfbe03792bf811a7d4efaef5
child 303294 09ffd37115bb0bae1ccf32a4f5f9a058fe02d249
push id19839
push usercbook@mozilla.com
push dateFri, 01 Jul 2016 09:19:59 +0000
treeherderfx-team@499d8875de7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersabr
bugs1283085
milestone50.0a1
Bug 1283085 - Handle new ALPN value r=abr
media/mtransport/transportlayerdtls.cpp
--- a/media/mtransport/transportlayerdtls.cpp
+++ b/media/mtransport/transportlayerdtls.cpp
@@ -922,16 +922,20 @@ bool TransportLayerDtls::CheckAlpn() {
       alpn_ = alpn_default_;
       return !alpn_.empty();
 
     case SSL_NEXT_PROTO_NO_OVERLAP:
       // This only happens if there is a custom NPN/ALPN callback installed and
       // that callback doesn't properly handle ALPN.
       MOZ_MTLOG(ML_ERROR, LAYER_INFO << "error in ALPN selection callback");
       return false;
+
+    case SSL_NEXT_PROTO_EARLY_VALUE:
+      MOZ_CRASH("Unexpected 0-RTT ALPN value");
+      return false;
   }
 
   // Warning: NSS won't null terminate the ALPN string for us.
   std::string chosen(chosenAlpn, chosenAlpnLen);
   MOZ_MTLOG(ML_NOTICE, LAYER_INFO << "Selected ALPN string: " << chosen);
   if (alpn_allowed_.find(chosen) == alpn_allowed_.end()) {
     // Maybe our peer chose a protocol we didn't offer (when we are client), or
     // something is seriously wrong.