Make nsITransportSecurityInfo builtinclass
Categories
(Core :: Security: PSM, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | fixed |
People
(Reporter: beth, Assigned: beth)
References
Details
(Whiteboard: [psm-assigned])
Attachments
(9 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
nsITransportSecurityInfo is presently not a builtinclass interface since several tests create a JS implemented nsITransportSecurityInfo in order to manually modify the cert. This not being builtinclass blocks
After discussing this with :keeler, the way forward is to
- Add a contract ID for
nsITransportSecurityInfoso that tests that only need the existence of this object can create one. - Add support to the test TLS server for setting the headers that these tests are testing.
- Translate all the tests manually testing headers to use the machinery provided in (2).
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
After further discussion, we've decided to not do (2) since neither side of the connection actually speaks HTTP. Instead, the tests will be updated to use the callback provided by add_connection_test.
| Assignee | ||
Comment 2•6 years ago
|
||
There is now a contract ID for nsITransportSecurityInfo, allowing
mozilla::psm::TransportSecurityInfo instances to be created from JS. Tests
using a JS-implemented nsITransportSecurityInfo that were not modifying,
e.g., the serverCert attribute have been updated to create a
mozilla::psm::TransportSecurityInfo via the contract.
| Assignee | ||
Comment 3•6 years ago
|
||
As part of making nsITranportSecurityInfo builtinclass, we can no longer use
JS-implemented nsITransportSecurityInfo instances in test cases. This patch
migrates test_forget_about_site_security_headers.js to use add_connection_test()to get a validnsITransportSecurityInfo` instance for
the unit tests.
To make this work, we also need default-ee cert and keys, as well as an
alternate.key (required as the subject key for
a.pinning2.example.com-pinningroot.pem) in test_pinning_dynamic, or the
tests will fail due to certificate errors.
Depends on D40346
| Assignee | ||
Comment 4•6 years ago
|
||
As part of making nsITranportSecurityInfo builtinclass, we can no longer use
JS-implemented nsITransportSecurityInfo instances in test cases. This patch
migrates test_ocsp_must_staple.js to use add_connection_test() to get a
valid nsITransportSecurityInfo instance for the unit tests.
Depends on D40347
| Assignee | ||
Comment 5•6 years ago
|
||
As part of making nsITranportSecurityInfo builtinclass, we can no longer use
JS-implemented nsITransportSecurityInfo instances in test cases. This patch
migrates test_pinning_header_parsing.js to use add_connection_test() to get
a valid nsITransportSecurityInfo instance for the unit tests.
Depends on D40348
| Assignee | ||
Comment 6•6 years ago
|
||
As part of making nsITranportSecurityInfo builtinclass, we can no longer
use JS-implemented nsITransportSecurityInfo instances in test cases.
This patch migrates test_sss_enumerate.js to use add_connection_test() to
get a valid nsITransportSecurityInfo instance for the unit tests.
Depends on D40349
| Assignee | ||
Comment 7•6 years ago
|
||
As part of making nsITranportSecurityInfo builtinclass, we can no longer use
JS-implemented nsITransportSecurityInfo instances in test cases. This patch
migrates test_sss_originAttributes.js to use add_connection_test() to get a
valid nsITransportSecurityInfo instance for the unit tests.
Depends on D40350
| Assignee | ||
Comment 8•6 years ago
|
||
As part of making nsITranportSecurityInfo builtinclass, we can no longer
use JS-implemented nsITransportSecurityInfo instances in test cases.
This patch migrates test_sss_resetState.js to use add_connection_test() to
get a valid nsITransportSecurityInfo instance for the unit tests.
Depends on D40351
| Assignee | ||
Comment 9•6 years ago
|
||
There are no longer any consumers of the JS-implemented
FakeTransportSecurityInfo class, so it can be removed. That removes the last
JS-implemented nsITransportSecurityInfo instance and it therefore can be
marked builtinclass.
Depends on D40352
| Assignee | ||
Comment 10•6 years ago
|
||
The MockSecurityInfo instances in the patched devtools tests are not actually
being used as nsITransportSecurityInfo instances; while QueryInterface
methods were generated for the them, these were never called. Additionally, the
methods they are being passed to are not XPCOM-defined and therefore do not
strictly require nsITransportSecurityInfo.
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Backed out for xpcshell failures at test_security-info-parser.js
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=260145812&repo=autoland&lineNumber=2442
Backout: https://hg.mozilla.org/integration/autoland/rev/468c0b8110e51e1257e93856a8e7da861995c758
| Assignee | ||
Comment 13•6 years ago
|
||
Latest patch should address these failures.
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=262340222&repo=autoland&lineNumber=13477
Backout link: https://hg.mozilla.org/integration/autoland/rev/4270a51c13610f43de1bec53fa717a1620524cd5
task 2019-08-19T21:01:02.491Z] 21:01:02 INFO - TEST-PASS | devtools/client/netmonitor/test/browser_net_security-redirect.js | There were two requests due to redirect. -
[task 2019-08-19T21:01:02.491Z] 21:01:02 INFO - Buffered messages finished
[task 2019-08-19T21:01:02.493Z] 21:01:02 INFO - TEST-UNEXPECTED-FAIL | devtools/client/netmonitor/test/browser_net_security-redirect.js | Initial request was marked insecure for domain column. -
[task 2019-08-19T21:01:02.494Z] 21:01:02 INFO - Stack trace:
[task 2019-08-19T21:01:02.494Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:test_ok:1576
[task 2019-08-19T21:01:02.494Z] 21:01:02 INFO - chrome://mochitests/content/browser/devtools/client/netmonitor/test/browser_net_security-redirect.js:null:39
[task 2019-08-19T21:01:02.495Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1346
[task 2019-08-19T21:01:02.495Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1381
[task 2019-08-19T21:01:02.496Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1209
[task 2019-08-19T21:01:02.496Z] 21:01:02 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
[task 2019-08-19T21:01:02.496Z] 21:01:02 INFO - TEST-PASS | devtools/client/netmonitor/test/browser_net_security-redirect.js | Redirected request was marked secure for domain column. -
[task 2019-08-19T21:01:02.497Z] 21:01:02 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-08-19T21:01:02.497Z] 21:01:02 INFO - TEST-UNEXPECTED-FAIL | devtools/client/netmonitor/test/browser_net_security-redirect.js | Initial request was marked insecure for URL column. -
[task 2019-08-19T21:01:02.498Z] 21:01:02 INFO - Stack trace:
[task 2019-08-19T21:01:02.498Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:test_ok:1576
[task 2019-08-19T21:01:02.498Z] 21:01:02 INFO - chrome://mochitests/content/browser/devtools/client/netmonitor/test/browser_net_security-redirect.js:null:49
[task 2019-08-19T21:01:02.499Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1346
[task 2019-08-19T21:01:02.499Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1381
[task 2019-08-19T21:01:02.499Z] 21:01:02 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1209
[task 2019-08-19T21:01:02.500Z] 21:01:02 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
Comment 16•6 years ago
|
||
| Assignee | ||
Comment 17•6 years ago
|
||
Trivial fix for this, rolled up into last commit.
Comment 18•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/15994e94ce79
https://hg.mozilla.org/mozilla-central/rev/1877f9c9aeeb
https://hg.mozilla.org/mozilla-central/rev/d01f8050aa3b
https://hg.mozilla.org/mozilla-central/rev/09b75b688829
https://hg.mozilla.org/mozilla-central/rev/72e97b86ce0b
https://hg.mozilla.org/mozilla-central/rev/efd936e4cafd
https://hg.mozilla.org/mozilla-central/rev/1023f2ecd9b5
https://hg.mozilla.org/mozilla-central/rev/6cfbe7c8ad5f
https://hg.mozilla.org/mozilla-central/rev/acd7b8cc02ab
Description
•