diff options
author | Rob Austein <sra@hactrn.net> | 2007-08-25 16:46:05 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-08-25 16:46:05 +0000 |
commit | 57995ddafe5df6e78110263a5d421d9a6a9a3de9 (patch) | |
tree | 0e5869454e7ac6e7a7aa2d5533cc60857008ac73 /scripts/http-server.py | |
parent | 7496e2285b84a84fbf5902b60096a5fbe1521b17 (diff) |
Finally get rid of rpki.https.CertInfo kludge.
svn path=/scripts/http-client.py; revision=912
Diffstat (limited to 'scripts/http-server.py')
-rw-r--r-- | scripts/http-server.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/http-server.py b/scripts/http-server.py index 876ea48c..dd7ec9a2 100644 --- a/scripts/http-server.py +++ b/scripts/http-server.py @@ -2,9 +2,15 @@ import rpki.https, tlslite.api, rpki.config -certInfo = rpki.https.CertInfo(rpki.config.parser("http-demo.conf"), "server") +cfg = rpki.config.parser("http-demo.conf") +section = "server" + +privateKey = rpki.x509.RSA_Keypair(PEM_file = cfg.get(section, "https-key")) + +certChain = rpki.x509.X509_chain() +certChain.load_from_PEM(cfg.multiget(section, "https-cert")) def handler(query, path): return 200, "Path: %s\nQuery: %s" % (path, query) -rpki.https.server(certInfo=certInfo, handlers={"/" : handler}) +rpki.https.server(privateKey=privateKey, certChain=certChain, handlers={"/" : handler}) |