Author: damoxc
Revision: 5495
Log:
make the locations of the pkey/cert configurable
Diff:
Modified: trunk/deluge/ui/web/server.py
===================================================================
--- trunk/deluge/ui/web/server.py 2009-07-16 08:58:05 UTC (rev 5494)
+++ trunk/deluge/ui/web/server.py 2009-07-16 09:24:55 UTC (rev 5495)
@@ -91,7 +91,9 @@
"show_keyword_search": False,
"show_sidebar": True,
"cache_templates": False,
- "https": False
+ "https": False,
+ "pkey": "ssl/daemon.pkey",
+ "cert": "ssl/daemon.cert"
}
OLD_CONFIG_KEYS = (
@@ -384,8 +386,9 @@
def getContext(self):
"""Creates an SSL context."""
ctx = SSL.Context(SSL.SSLv3_METHOD)
-
ctx.use_privatekey_file(common.get_default_config_dir(os.path.join('ssl',
'daemon.pkey')))
-
ctx.use_certificate_file(common.get_default_config_dir(os.path.join('ssl',
'daemon.cert')))
+ deluge_web = component.get("DelugeWeb")
+ ctx.use_privatekey_file(common.get_default_config_dir(deluge_web.pkey))
+
ctx.use_certificate_file(common.get_default_config_dir(deluge_web.cert))
return ctx
class DelugeWeb(component.Component):
@@ -420,6 +423,8 @@
self.site = server.Site(self.top_level)
self.port = self.config["port"]
self.https = self.config["https"]
+ self.pkey = self.config["pkey"]
+ self.cert = self.config["cert"]
self.web_api = WebApi()
self.auth = Auth()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---