Bug 1103120 - Part 18: Client: Validate random value, debugging begins. r=past
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 26 Jan 2015 12:47:14 -0600
changeset 239180 c7e7edea57c01a1f425f269bb3df6bd8de1313ea
parent 239179 b36599b3df09683921e220c71c5885b18bd87dc9
child 239181 d47db7a17a2e869642bf11ae42baffffd57bf972
push id487
push userbcampen@mozilla.com
push dateMon, 26 Jan 2015 23:32:56 +0000
reviewerspast
bugs1103120
milestone38.0a1
Bug 1103120 - Part 18: Client: Validate random value, debugging begins. r=past
toolkit/devtools/security/auth.js
--- a/toolkit/devtools/security/auth.js
+++ b/toolkit/devtools/security/auth.js
@@ -334,16 +334,29 @@ OOBCert.Client.prototype = {
             activeSendDialog = this.sendOOB({
               host,
               port,
               cert,
               authResult,
               oob: oobData
             });
             break;
+          case AuthenticationResult.ALLOW:
+          case AuthenticationResult.ALLOW_PERSIST:
+            // Step B.12
+            // Client verifies received value matches K
+            if (packet.k != oobData.k) {
+              transport.close(new Error("Auth secret mismatch"));
+              return;
+            }
+            // Step B.13
+            // Debugging begins
+            transport.hooks = null;
+            deferred.resolve(transport);
+            break;
           default:
             transport.close(new Error("Invalid auth result: " + authResult));
             return;
         }
       }.bind(this)),
       onClosed(reason) {
         closeDialog();
         // Transport died before auth completed