Skip to content

Commit 7081925

Browse files
committed
Work around bizarre Convergence/SSL Observatory interactions
Convergence actually MITMS Firefox using a local root CA it makes and installs in your trust root. It does this because of https://bugzilla.mozilla.org/show_bug.cgi?id=644640. Normally the SSL Observatory ignores such chains, but if the user has select "submit certs from alternative roots", we should avoid sending the local root CA cert, since it functions like a tracking ID. This is just a first step towards better Convergence/SSL Observatory interoperation.
1 parent 4aadb8b commit 7081925

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/components/ssl-observatory.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ SSLObservatory.prototype = {
331331
}
332332
}
333333

334-
if (!this.myGetBoolPref("alt_roots"))
334+
if (!this.myGetBoolPref("alt_roots")) {
335335
if (rootidx == -1 || (fps.length > 1 && !(fps[rootidx] in this.public_roots))) {
336336
if (rootidx == -1) {
337337
rootidx = fps.length-1;
@@ -340,6 +340,23 @@ SSLObservatory.prototype = {
340340
+domain+" with root "+fps[rootidx]);
341341
return;
342342
}
343+
} else {
344+
// Convergence currently performs MITMs against the Firefox in order to
345+
// get around https://bugzilla.mozilla.org/show_bug.cgi?id=644640. The
346+
// end-entity cert produced by Convergence contains a copy of the real
347+
// end-entity cert inside an X509v3 extension. For now we submit the
348+
// synthetic end-entity cert but avoid the root CA cert above it, which would
349+
// function like a tracking ID. If anyone knows how to parse X509v3
350+
// extensions in JS, we should do that instead.
351+
var convergence = Components.classes['@thoughtcrime.org/convergence;1'];
352+
if (convergence)
353+
convergence = convergence.getService().wrappedJSObject;
354+
if (convergence && convergence.enabled) {
355+
this.log(INFO, "Convergence uses its own root CAs; not submitting those");
356+
certArray = certArray.slice(0,1);
357+
fps = fps.slice(0,1);
358+
}
359+
}
343360

344361
if (fps[0] in this.already_submitted) {
345362
this.log(INFO, "Already submitted cert for "+domain+". Ignoring");

0 commit comments

Comments
 (0)