Closed
Bug 1025066
Opened 10 years ago
Closed 9 years ago
Support ssl (i.e. https / wss) in web-platform-tests
Categories
(Testing :: web-platform-tests, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla37
People
(Reporter: jgraham, Assigned: jgraham)
References
(Depends on 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
This should be possible using the same approach that mochitest uses, which aiui is something like installing a fake ca into the temporary profile and using a certificate from that ca for the server processes.
Comment 1•10 years ago
|
||
It's *slightly* more involved than that, but that's the right basic premise. You need the ssltunnel binary from a test package (the right one for your host system) and you need to write a configuration file for it like so: http://hg.mozilla.org/mozilla-central/annotate/48eee276b1ee/testing/mochitest/runtests.py#l680 You also need the certs/ directory from a test package, that has the prebuilt certificate store with all the testing certs. Then you need to fill the certificate DB in your test profile like so: http://hg.mozilla.org/mozilla-central/annotate/48eee276b1ee/testing/mochitest/runtests.py#l900 That code already has a comment saying it ought to move to mozprofile, so if you want to use it now might be a good time. The "locations" stuff that all of this talks about is using this file, which is also in the test package: http://mxr.mozilla.org/mozilla-central/source/build/pgo/server-locations.txt
Comment 2•10 years ago
|
||
Alternately if you wanted to just build your own certificate store, the script that does that is here: http://mxr.mozilla.org/mozilla-central/source/build/pgo/genpgocert.py Note that all of this requires some NSS commandline tools for the host system as well.
Assignee | ||
Comment 3•10 years ago
|
||
Code review at https://critic.hoppipolla.co.uk/r/3002
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8539320 -
Flags: review?(ted)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → james
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8540114 -
Flags: review?(ted)
Assignee | ||
Comment 7•10 years ago
|
||
/r/1617 - Bug 1025066 - Add certs and mach integration for running web-platform-tests with https. Pull down this commit: hg pull review -r 0ae890e02b3b522e2a6e3c7d25e6fe636cfcde82
Comment 8•10 years ago
|
||
Comment on attachment 8540072 [details] [diff] [review] Enable web-platform-tests script to access the certutils binary Review of attachment 8540072 [details] [diff] [review]: ----------------------------------------------------------------- ::: scripts/web_platform_tests.py @@ +138,5 @@ > > str_format_values = { > 'binary_path': self.binary_path, > 'test_path': dirs["abs_wpttest_dir"], > + 'test_install_path': dirs["abs_test_install_dir"], What is this for?
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Armen Zambrano - Automation & Tools Engineer (:armenzg) from comment #8) > Comment on attachment 8540072 [details] [diff] [review] > Enable web-platform-tests script to access the certutils binary > > Review of attachment 8540072 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: scripts/web_platform_tests.py > @@ +138,5 @@ > > > > str_format_values = { > > 'binary_path': self.binary_path, > > 'test_path': dirs["abs_wpttest_dir"], > > + 'test_install_path': dirs["abs_test_install_dir"], > > What is this for? I need to get at the bin/ directory from the in-tree configs so that I can pass the location of the certutil binary to wptrunner (see the mozreview review on this bug).
Updated•10 years ago
|
Attachment #8540072 -
Flags: review?(armenzg) → review+
Assignee | ||
Comment 10•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=4a3ab0af566a
Assignee | ||
Comment 11•9 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=9b29de231a57
Assignee | ||
Comment 12•9 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=fb3edfe54138
Updated•9 years ago
|
Attachment #8540114 -
Flags: review?(ted) → review+
Comment 13•9 years ago
|
||
https://reviewboard.mozilla.org/r/1615/#review1275 ::: testing/web-platform/mach_commands.py (Diff revision 1) > + kwargs["host_cert_path"] = os.path.join(here, "certs", "web-platform.test.pem") I definitely wish there was a nicer way to set these defaults on the options parser, and even to not expose these as commandline options at all for the mach command (since there's no reason to change the defaults when running on a local build), but your existing code that shares the commandline parser with the harness is better than most of our harnesses already so I don't have a great suggestion.
Updated•9 years ago
|
Attachment #8539320 -
Flags: review?(ted) → review+
Assignee | ||
Comment 14•9 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=d75d1187d8c6
Assignee | ||
Comment 15•9 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=ec7c0632b156
Comment 16•9 years ago
|
||
In production: https://hg.mozilla.org/build/mozharness/rev/3ae51b94a56a
Comment 17•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/47671b5f66ab https://hg.mozilla.org/mozilla-central/rev/d16c7eac45de https://hg.mozilla.org/mozilla-central/rev/93c1be376911 https://hg.mozilla.org/mozilla-central/rev/5e38f65cb587
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Assignee | ||
Comment 18•9 years ago
|
||
Attachment #8540114 -
Attachment is obsolete: true
Attachment #8618173 -
Flags: review+
Assignee | ||
Comment 19•9 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•