Tom Wardill has proposed merging ~twom/launchpad:development-ssl-certificates 
into launchpad:master.

Commit message:
Use instance name instead of hardcoded development path

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~twom/launchpad/+git/launchpad/+merge/380416

Using a copy of the development configuration with a different name and 
hostname requires a new self-signed certificate to be generated.
Unless you overwrite the 'development' certificate, this then is not loaded and 
passed to requests to the test openid server.
Change the hardcoded path to the 'development' certificate to use the instance 
name (passed using the -i parameter to bin/run) instead.

No change to the development environment, but allows other configs to use a 
different certificate.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~twom/launchpad:development-ssl-certificates into launchpad:master.
diff --git a/lib/lp/services/webapp/openid.py b/lib/lp/services/webapp/openid.py
index 622fa0e..5b77f0a 100644
--- a/lib/lp/services/webapp/openid.py
+++ b/lib/lp/services/webapp/openid.py
@@ -28,6 +28,7 @@ def set_default_openid_fetcher():
     # if pycurl is installed.
     fetcher = Urllib2Fetcher()
     if config.launchpad.enable_test_openid_provider:
-        cafile = os.path.join(config.root, "configs/development/launchpad.crt")
+        cert_path = "configs/{}/launchpad.crt".format(config.instance_name)
+        cafile = os.path.join(config.root, cert_path)
         fetcher.urlopen = partial(urlopen, cafile=cafile)
     setDefaultFetcher(fetcher)
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to