aboutsummaryrefslogtreecommitdiff
path: root/scripts/http-server.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/http-server.py')
-rw-r--r--scripts/http-server.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/http-server.py b/scripts/http-server.py
index 7716d5ed..a966f6fa 100644
--- a/scripts/http-server.py
+++ b/scripts/http-server.py
@@ -2,15 +2,14 @@
import rpki.https, tlslite.api, rpki.config
-cfg = rpki.config.parser("http-demo.conf")
-section = "server"
+cfg = rpki.config.parser("http-demo.conf", "server")
-privateKey = rpki.x509.RSA(PEM_file = cfg.get(section, "https-key"))
+privateKey = rpki.x509.RSA(PEM_file = cfg.get("https-key"))
certChain = rpki.x509.X509_chain()
-certChain.load_from_PEM(cfg.multiget(section, "https-cert"))
+certChain.load_from_PEM(cfg.multiget("https-cert"))
def handler(query, path):
return 200, "Path: %s\nQuery: %s" % (path, query)
-rpki.https.server(privateKey=privateKey, certChain=certChain, handlers=handler)
+rpki.https.server(privateKey = privateKey, certChain = certChain, handlers = handler)