Commits

desmaj  committed 309b901

added support for ssl certificate chains with a patch from Paul Querna (fixes TRAC-138); updated and tested the new example orbited.cfg file

  • Participants
  • Parent commits 1fb8230
  • Tags 0.7.11beta1

Comments (0)

Files changed (4)

   - Cleaned up the search for an adequate json library
   - Added some simple Selenium tests; see README.testing for details
   - Added NEWS
+  - Added daemonization support with python-daemon from TRAC # 157 (Thanks to Luke Macken)
+  - Added support for ssl chained certificates from Trac #138 (Thanks to Paul Querna)
+  - Modified logging to use the Python standard library logging module.
+    This is a BACKWARDS-INCOMPATIBLE CHANGE from 0.7.10.

File daemon/orbited.cfg

 reactor=select
 # reactor=kqueue
 # reactor=epoll
+proxy.enabled=1
 session.ping_interval = 40
 session.ping_timeout = 30
 # once the sockets are open, orbited will drop its privileges to this user.
 
 [listen]
 http://:8000
-#stomp://:61613
 # uncomment to enable SSL on port 8043 using given .key and .crt files
 #https://:8043
 #
 #[ssl]
 #key=orbited.key
 #crt=orbited.crt
+#chain=orbited.chain
 
 [static]
 
 [access]
 localhost:8000 -> irc.freenode.net:6667
 * -> localhost:4747
-#* -> localhost:61613
 
 # new logging configuration using the python stdlib logging.fileConfig
 [loggers]
-keys = root,orbited
+keys = root,orbited,orbited_TCPConnectionResource
 
 [handlers]
-keys = console, debug, info, error
+keys = console,errors,connections
 
 [formatters]
 keys = generic
 
 [logger_root]
 level = NOTSET
-handlers = debug, info, error
+handlers = console
 
 [logger_orbited]
+level = WARN
+handlers = errors
+qualname = orbited
+
+[logger_orbited_TCPConnectionResource]
 level = DEBUG
-handlers = 
-qualname = orbited
+handlers = connections
+qualname = orbited.cometsession.TCPConnectionResource
 
 [handler_console]
 class = StreamHandler
 args = (sys.stderr,)
-level = NOTSET
+level = INFO
 formatter = generic
 
-[handler_debug]
+[handler_errors]
+class = FileHandler
+args = ('error.log', 'w')
+level = WARN
+formatter = generic
+
+[handler_connections]
 class = FileHandler
 level = DEBUG
 formatter = generic
-args = ('debug.log', 'w')
-
-[handler_info]
-class = FileHandler
-level = INFO
-formatter = generic
-args = ('info.log', 'w')
-
-[handler_error]
-class = FileHandler
-level = ERROR
-formatter = generic
-args = ('error.log', 'w')
+args = ('connections.log', 'w')
 
 [formatter_generic]
 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s

File daemon/orbited/_version.py

-__version__ = "0.7.11dev"
+__version__ = "0.7.11beta1"

File daemon/orbited/start.py

             from twisted.internet import ssl
             crt = config['[ssl]']['crt']
             key = config['[ssl]']['key']
+            chain = config['[ssl]'].get('chain')
             try:
                 ssl_context = ssl.DefaultOpenSSLContextFactory(key, crt)
+                if chain:
+                    ssl_context._context.use_certificate_chain_file(chain)
             except ImportError:
                 raise
-            except:
-                logger.error("Error opening key or crt file: %s, %s" % (key, crt))
+            except Exception, e:
+                logger.error("Error opening key, crt or chain file: %s, %s, %s, %s" % (key, crt, chain, e))
                 sys.exit(1)
             logger.info('Listening https@%s (%s, %s)' % (url.port, key, crt))
             reactor.listenSSL(url.port, site, ssl_context, interface=hostname)