From fb31a985bc20070429fa135dddc3265103102278 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 28 Jul 2016 14:14:19 +0000 Subject: [PATCH] - fixed ssl configuration handling - added default ssl configuration --- TLD_Builder/config.py | 4 ++-- TLD_Builder/request_handler_server.py | 4 ++-- config/builder.conf | 8 ++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/TLD_Builder/config.py b/TLD_Builder/config.py index 5e3bd9e..663862e 100644 --- a/TLD_Builder/config.py +++ b/TLD_Builder/config.py @@ -72,10 +72,10 @@ class Builder_Conf: self.max_keep_time = int(get("max_keep_time", 168))*60*60 self.bot_email = get("bot_email", "") self.control_url = get("control_url") - self.request_handler_server_port = int(get("port", d=1234, sec="request-server")) + self.request_handler_server_port = int(get("port", d=1231, sec="request-server")) self.request_handler_server_ssl = get("ssl", d="False", sec="request-server") if self.request_handler_server_ssl: - self.request_handler_server_ssl_port = int(get("port", d=1235, sec="request-server")) + self.request_handler_server_ssl_port = int(get("ssl_port", d=1241, sec="request-server")) self.request_handler_server_ssl_key = get("ssl_key", d="", sec="request-server") self.request_handler_server_ssl_cert = get("ssl_cert", d="", sec="request-server") self.builder_list = get("builder_list", "") diff --git a/TLD_Builder/request_handler_server.py b/TLD_Builder/request_handler_server.py index ece2f96..e343590 100644 --- a/TLD_Builder/request_handler_server.py +++ b/TLD_Builder/request_handler_server.py @@ -96,8 +96,8 @@ def main(srv_ssl=False): server = HTTPServer((host, port), MyHandler) if srv_ssl: server.socket = ssl.wrap_socket (server.socket, - keyfile = config.request_handler_server_ssl_key, - certfile = config.request_handler_server_ssl_cert, + keyfile = path.conf_dir + "/" + config.request_handler_server_ssl_key, + certfile = path.conf_dir + "/" + config.request_handler_server_ssl_cert, ca_certs = "/etc/certs/ca-certificates.crt", server_side=True) except Exception, e: diff --git a/config/builder.conf b/config/builder.conf index aefdabf..e2374ea 100644 --- a/config/builder.conf +++ b/config/builder.conf @@ -63,6 +63,14 @@ rpm_cache_dir = /spools/ready # List of name-version-release tag prefixes. tag_prefixes = auto/ti/ +# ------ request handler server config, ignored on binary builders: +[request-server] +port = 1231 +ssl = True +ssl_port = 1241 +ssl_cert = request-server.crt +ssl_key = request-server.key + # ------ Configs for particular builders: [ti-src] -- 2.46.0