Commit a13132df authored by tkent's avatar tkent Committed by Commit bot

Improve README.chromium for WPTServe.

Also, wptserve.py shows a warning before certificate expiration.

BUG=623613
NOTRY=true

Review-Url: https://codereview.chromium.org/2443863002
Cr-Commit-Position: refs/heads/master@{#427270}
parent 5e529e06
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
"""Start and stop the WPTserve servers as they're used by the layout tests.""" """Start and stop the WPTserve servers as they're used by the layout tests."""
import datetime
import logging
from webkitpy.layout_tests.servers import server_base from webkitpy.layout_tests.servers import server_base
...@@ -50,6 +52,13 @@ class WPTServe(server_base.ServerBase): ...@@ -50,6 +52,13 @@ class WPTServe(server_base.ServerBase):
self._keep_process_reference = True self._keep_process_reference = True
self._start_cmd = start_cmd self._start_cmd = start_cmd
expiration_date = datetime.date(2025, 1, 4)
if datetime.date.today() > expiration_date - datetime.timedelta(30):
logging.getLogger(__name__).error(
'Pre-generated keys and certificates are going to be expired at %s.'
' Please re-generate them by following steps in %s/README.chromium.'
% (expiration_date.strftime('%b %d %Y'), path_to_wpt_support))
def _stop_running_server(self): def _stop_running_server(self):
# Clean up the pid file. # Clean up the pid file.
if self._pid and not self._executive.check_running_pid(self._pid): if self._pid and not self._executive.check_running_pid(self._pid):
......
...@@ -51,8 +51,8 @@ checked in and try to keep the list as small as possible (use what you need). ...@@ -51,8 +51,8 @@ checked in and try to keep the list as small as possible (use what you need).
certs/ certs/
====== ======
This directory contains a private key and a certificate of WPTServe, and files This directory contains a private key and a certificate of WPTServe, and files
for self-signed CA. WPTServe generates them on the fly with "openssl" command in for self-signed CA. By default, WPTServe generates these files using the
the default setting, but we check in pre-generated files to avoid "openssl" "openssl" command, but we check in pre-generated files to avoid "openssl"
dependency. dependency.
These certificates will expire in January 2025. Here is an instruction to These certificates will expire in January 2025. Here is an instruction to
...@@ -99,11 +99,13 @@ index 5b571c0..223a18b 100644 ...@@ -99,11 +99,13 @@ index 5b571c0..223a18b 100644
6. Replace certs/ with wpt/_certs/ 6. Replace certs/ with wpt/_certs/
% rm -fr certs % rm -fr certs
% mv wpt/_certs certs % mv wpt/_certs certs
7. Look at *.pem, and update "January 2025" in this document to new expiration 7. Look at *.pem, and update "January 2025" in this document and expiration_date
date. in wptserve.py to new expiration date.
8. git commit -a 8. git commit -a
9. git cl upload, etc. 9. git cl upload, etc.
TODO(tkent): Make a script to re-generate keys and certificates.
** **
Rolling in WPT Rolling in WPT
...@@ -136,9 +138,6 @@ https://github.com/w3c/web-platform-tests/blob/master/README.md ...@@ -136,9 +138,6 @@ https://github.com/w3c/web-platform-tests/blob/master/README.md
Also, check out the WPTServe Documentation Also, check out the WPTServe Documentation
(https://wptserve.readthedocs.org/en/latest/). (https://wptserve.readthedocs.org/en/latest/).
For setting up SSL, refer to Tools/Scripts/webkitpy/thirdparty/wpt/wpt/_certs
(which gets generated on the first run).
Note that editing /etc/hosts is not required for run-webkit-tests since Note that editing /etc/hosts is not required for run-webkit-tests since
content_shell is invoked with flags to map all *.test domains to 127.0.0.1. content_shell is invoked with flags to map all *.test domains to 127.0.0.1.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment