Auteur Sujet: Erreur NS_ERROR_NET_INADEQUATE_SECURITY  (Lu 2722 fois)

0 Membres et 1 Invité sur ce sujet

vivien

  • Administrateur
  • *
  • Messages: 47 092
    • Twitter LaFibre.info
Erreur NS_ERROR_NET_INADEQUATE_SECURITY
« le: 01 mars 2017 à 21:42:57 »
Savez-vous à quoi correspond l'erreur NS_ERROR_NET_INADEQUATE_SECURITY ?

Je l'ai en me déconnectant de Hotmail avec Firefox 51:


SSL Labs  ( https://www.ssllabs.com/ssltest/analyze.html?d=outlook.live.com ) ne trouve pas de problème à part un pb sur HSTS :
Strict Transport Security (HSTS) Invalid : Server provided more than one HSTS header


Information complèmentaires :
- User agent :  Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
- Système d'exploitation : Ubuntu 16.10 64bits - Kernel 4.8.0-39-generic #42-Ubuntu SMP
- FAI : Orange ADSL avec Livebox v3 sur un NRA qui me semble connecté en FH
- IPv4:  90.9.154.155 (AClermont-Ferrand-654-1-430-155.w90-9.abo.wanadoo.fr)
- IPv6 : Pas d'IPv6

corrector

  • Invité
Erreur NS_ERROR_NET_INADEQUATE_SECURITY
« Réponse #1 le: 02 mars 2017 à 03:42:20 »
Dans https://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/Http2Session.cpp

  int16_t version = ssl->GetSSLVersionUsed();
  LOG3(("Http2Session::ConfirmTLSProfile %p version=%x\n", this, version));
  if (version < nsISSLSocketControl::TLS_VERSION_1_2) {
    LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to lack of TLS1.2\n", this));
    RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY);
  }

  uint16_t kea = ssl->GetKEAUsed();
  if (kea != ssl_kea_dh && kea != ssl_kea_ecdh) {
    LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to invalid KEA %d\n",
          this, kea));
    RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY);
  }

  uint32_t keybits = ssl->GetKEAKeyBits();
  if (kea == ssl_kea_dh && keybits < 2048) {
    LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to DH %d < 2048\n",
          this, keybits));
    RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY);
  } else if (kea == ssl_kea_ecdh && keybits < 224) { // see rfc7540 9.2.1.
    LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 224\n",
          this, keybits));
    RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY);
  }

  int16_t macAlgorithm = ssl->GetMACAlgorithmUsed();
  LOG3(("Http2Session::ConfirmTLSProfile %p MAC Algortihm (aead==6) %d\n",
        this, macAlgorithm));
  if (macAlgorithm != nsISSLSocketControl::SSL_MAC_AEAD) {
    LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to lack of AEAD\n", this));
    RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY);
  }

    } else if (mGoAwayReason == INADEQUATE_SECURITY) {
      CloseStream(stream, NS_ERROR_NET_INADEQUATE_SECURITY);

https://dxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp

      case NS_ERROR_NET_INADEQUATE_SECURITY:
        // Server negotiated bad TLS for HTTP/2.
        error.AssignLiteral("inadequateSecurityError");
        addHostPort = true;
        break;

vivien

  • Administrateur
  • *
  • Messages: 47 092
    • Twitter LaFibre.info
Erreur NS_ERROR_NET_INADEQUATE_SECURITY
« Réponse #2 le: 02 mars 2017 à 07:07:57 »
C'est étonnant, car le site est en http 1.1 et non en http2.

corrector

  • Invité
Erreur NS_ERROR_NET_INADEQUATE_SECURITY
« Réponse #3 le: 02 mars 2017 à 14:27:18 »
C'est aussi ce que j'ai constaté. Tu as essayé une capture réseau? C'est reproductible?

Il y a peut-être une autre chose qui provoque cette erreur, je n'ai pas vraiment fouillé le code de ce machin.