diff options
author | Rob Austein <sra@hactrn.net> | 2008-01-09 15:15:36 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2008-01-09 15:15:36 +0000 |
commit | df4fd57fe409c4642dd98f202c9493bab02bd856 (patch) | |
tree | 4ba13eb03d8e3fde84f00bd4ca3688d673fc59e2 /scripts/Old/http-server.py | |
parent | a7b93e9f09a428c4d5d90353ddd79044e304686e (diff) |
Renaming http-client.py to cronjob.py is easier than explaining why
the name is wrong.
svn path=/scripts/Old/http-client.py; revision=1453
Diffstat (limited to 'scripts/Old/http-server.py')
-rw-r--r-- | scripts/Old/http-server.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/Old/http-server.py b/scripts/Old/http-server.py new file mode 100644 index 00000000..a966f6fa --- /dev/null +++ b/scripts/Old/http-server.py @@ -0,0 +1,15 @@ +# $Id$ + +import rpki.https, tlslite.api, rpki.config + +cfg = rpki.config.parser("http-demo.conf", "server") + +privateKey = rpki.x509.RSA(PEM_file = cfg.get("https-key")) + +certChain = rpki.x509.X509_chain() +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) |