[X2go-Commits] x2gobroker.git - master (branch) updated: 7dfbf692abd457506ebf3f1372b8d0a11f3c9767

X2Go dev team git-admin at x2go.org
Tue Feb 12 22:49:01 CET 2013


The branch, master has been updated
       via  7dfbf692abd457506ebf3f1372b8d0a11f3c9767 (commit)
      from  f4ee02eef0a15e605c4ff80641470f8267b5a06e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7dfbf692abd457506ebf3f1372b8d0a11f3c9767
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Feb 12 22:50:57 2013 +0100

    make SSL feature available

-----------------------------------------------------------------------

Summary of changes:
 debian/control                   |    1 +
 debian/x2gobroker-daemon.default |    8 ++++++++
 debian/x2gobroker-daemon.init    |    7 +++++++
 sbin/x2gobroker                  |    8 +++++++-
 x2gobroker/defaults.py           |   11 +++++++++++
 5 files changed, 34 insertions(+), 1 deletion(-)

The diff of changes is:
diff --git a/debian/control b/debian/control
index b70e569..3b222bc 100644
--- a/debian/control
+++ b/debian/control
@@ -113,6 +113,7 @@ Depends:
  ${python:Depends},
  python-pampy,
  python-netaddr,
+ python-webpy (>= 1:0.37),
 Suggests:
  apache2 | httpd,
 Description: X2Go http(s) based session broker (Python modules)
diff --git a/debian/x2gobroker-daemon.default b/debian/x2gobroker-daemon.default
index d7466e6..47ccb43 100644
--- a/debian/x2gobroker-daemon.default
+++ b/debian/x2gobroker-daemon.default
@@ -23,3 +23,11 @@ START_DAEMON=true
 
 # path to the X2Go Session Broker's agent command
 #X2GOBROKER_AGENT_CMD=/usr/lib/x2go/x2gobroker-agent
+
+### enable SSL, you will have to create your own SSL certificates ###
+
+# SSL certificate file
+#X2GOBROKER_SSL_CERTFILE=/etc/x2go/broker/ssl/broker.crt
+
+# SSL key file (ensure permissions are set to root:x2gobroker:0640)
+#X2GOBROKER_SSL_CERTFILE=/etc/x2go/broker/ssl/broker.key
diff --git a/debian/x2gobroker-daemon.init b/debian/x2gobroker-daemon.init
index 2ee927a..0ee9aed 100644
--- a/debian/x2gobroker-daemon.init
+++ b/debian/x2gobroker-daemon.init
@@ -32,10 +32,17 @@ X2GOBROKER_DEFAULT_BACKEND="zeroconf"
 X2GOBROKER_CONFIG="/etc/x2go/x2gobroker.conf"
 X2GOBROKER_SESSIONPROFILES="/etc/x2go/broker/x2gobroker-sessionprofiles.conf"
 X2GOBROKER_AGENT_CMD="/usr/lib/x2go/x2gobroker-agent"
+X2GOBROKER_SSL_CERTFILE=
+X2GOBROKER_SSL_KEYFILE=
 test -f $DEBIANCONFIG && . $DEBIANCONFIG
 
+export X2GOBROKER_DEBUG=0
+export X2GOBROKER_CONFIG="/etc/x2go/x2gobroker.conf"
 export X2GOBROKER_DEFAULT_BACKEND
+export X2GOBROKER_SESSIONPROFILES="/etc/x2go/broker/x2gobroker-sessionprofiles.conf"
 export X2GOBROKER_AGENT_CMD
+export X2GOBROKER_SSL_CERTFILE
+export X2GOBROKER_SSL_KEYFILE
 
 . /lib/lsb/init-functions
 
diff --git a/sbin/x2gobroker b/sbin/x2gobroker
index 822f18d..5c1fdd8 100755
--- a/sbin/x2gobroker
+++ b/sbin/x2gobroker
@@ -22,9 +22,10 @@
 
 import sys
 import os
-import web
 import argparse
 import socket
+import web
+from web.wsgiserver import CherryPyWSGIServer
 
 try:
     import x2gobroker.defaults
@@ -66,6 +67,11 @@ from x2gobroker.web.plain import *
 #from x2gobroker.web.json import *
 #from x2gobroker.web.html import *
 
+# switch on https:// mode
+if x2gobroker.defaults.X2GOBROKER_SSL_CERTFILE and x2gobroker.defaults.X2GOBROKER_SSL_KEYFILE:
+    CherryPyWSGIServer.ssl_certificate = x2gobroker.defaults.X2GOBROKER_SSL_CERTFILE
+    CherryPyWSGIServer.ssl_private_key = x2gobroker.defaults.X2GOBROKER_SSL_KEYFILE
+
 # define the web.py URLs
 urls = ( '/plain/(.*)', 'X2GoBrokerWebPlain',
 #         '/json/(.*)', 'X2GoBrokerWebJson',
diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py
index cb1bf67..63bc254 100644
--- a/x2gobroker/defaults.py
+++ b/x2gobroker/defaults.py
@@ -51,6 +51,17 @@ if os.environ.has_key('X2GOBROKER_DEFAULT_BACKEND'):
 else:
     X2GOBROKER_DEFAULT_BACKEND="zeroconf"
 
+if os.environ.has_key('X2GOBROKER_SSL_CERTFILE'):
+    X2GOBROKER_SSL_CERTFILE=os.environ['X2GOBROKER_SSL_CERTFILE']
+else:
+    X2GOBROKER_SSL_CERTFILE=""
+
+if os.environ.has_key('X2GOBROKER_SSL_KEYFILE'):
+    X2GOBROKER_SSL_KEYFILE=os.environ['X2GOBROKER_SSL_KEYFILE']
+else:
+    X2GOBROKER_SSL_KEYFILE=""
+
+
 # defaults for X2Go Sessino Broker configuration file
 X2GOBROKER_CONFIG_DEFAULTS = {
     'global': {


hooks/post-receive
-- 
x2gobroker.git (HTTP(S) Session broker for X2Go)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).




More information about the x2go-commits mailing list