Shim the certificate database in xpcshell tests

RESOLVED FIXED in Firefox 46

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mossop, Assigned: mossop)

Tracking

Trunk
mozilla47
Points:
---

Firefox Tracking Flags

(firefox46 fixed, firefox47 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
The xpcshell tests generate and modify a lot of add-ons on the fly. When signing becomes mandatory they will suddenly all fail to work unless we also sign them. But switching from generated extensions to in-tree ones would be a lot of work  even ignoring getting them signed.

In xpcshell tests though we have the ability to shim certain xpcom components and the certificate database we use to verify XPI signatures is one of them. This can't work for the other test suites because it has already been loaded by the time the test harness runs.

With this approach we can effectively force the add-ons manager to believe that add-ons are signed even though they have no signature.
(Assignee)

Comment 1

3 years ago
Created attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

Review commit: https://reviewboard.mozilla.org/r/33101/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33101/
Attachment #8714474 - Flags: review?(rhelmer)
(Assignee)

Comment 2

3 years ago
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/33101/diff/1-2/
(Assignee)

Updated

3 years ago
Attachment #8714474 - Flags: review?(rhelmer)
(Assignee)

Comment 3

3 years ago
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/33101/diff/2-3/
Attachment #8714474 - Flags: review?(rhelmer)
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

https://reviewboard.mozilla.org/r/33101/#review30473
Attachment #8714474 - Flags: review?(rhelmer) → review+
(Assignee)

Updated

3 years ago
Attachment #8714474 - Attachment description: MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r?rhelmer → MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer
(Assignee)

Comment 7

3 years ago
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/33101/diff/3-4/
(Assignee)

Comment 8

3 years ago
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

Can't figure out how to re-request review in review board. Can you skim over the last interdiff, it just makes the cache flush test ignore flushes from the fake certificate db.
Attachment #8714474 - Flags: review+ → review?(rhelmer)
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

https://reviewboard.mozilla.org/r/33101/#review30873
Attachment #8714474 - Flags: review?(rhelmer) → review+

Comment 11

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/1d5b210de3c9
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox47: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
(Assignee)

Comment 12

3 years ago
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

Approval Request Comment
[Feature/regressing bug #]: Signed add-ons
[User impact if declined]: This is needed to force signing on in 46
[Describe test coverage new/current, TreeHerder]: On m-c for a while
[Risks and why]: Very low, mostly test only changes
[String/UUID change made/needed]: None
Attachment #8714474 - Flags: approval-mozilla-aurora?
status-firefox46: --- → affected
Comment on attachment 8714474 [details]
MozReview Request: Bug 1244357: Use a shim around the certificate DB to allow the add-ons manager to think that add-ons are signed when they aren't. r=rhelmer

We want our tests to work for sure. Approved for uplift to aurora.
Attachment #8714474 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.