diff options
author | Rob Austein <sra@hactrn.net> | 2007-10-03 14:28:38 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-10-03 14:28:38 +0000 |
commit | 84be09217e00234af8672304eb509e9520566592 (patch) | |
tree | 0cb4796230ae21053ea21f93480c477e93729e38 /scripts/irdb.py | |
parent | d41b9578692a2eaf4e7eef95f216299bb2b8a24b (diff) |
Finish changes to CMS calling sequence
svn path=/scripts/irbe-cli.py; revision=1082
Diffstat (limited to 'scripts/irdb.py')
-rwxr-xr-x | scripts/irdb.py | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/scripts/irdb.py b/scripts/irdb.py index f06c4097..be191d75 100755 --- a/scripts/irdb.py +++ b/scripts/irdb.py @@ -50,23 +50,20 @@ def handler(query, path): return 500, "Unhandled exception %s" % data cfg = rpki.config.parser("irbe.conf") -section = "irdb" +cfg_section = "irdb" -db = MySQLdb.connect(user = cfg.get(section, "sql-username"), - db = cfg.get(section, "sql-database"), - passwd = cfg.get(section, "sql-password")) +db = MySQLdb.connect(user = cfg.get(cfg_section, "sql-username"), + db = cfg.get(cfg_section, "sql-database"), + passwd = cfg.get(cfg_section, "sql-password")) cur = db.cursor() -cms_ta = cfg.get(section, "cms-ta") +cms_ta = rpki.x509.X509(Auto_file = cfg.get(cfg_section, "cms-ta")) +cms_key = rpki.x509.RSA_Keypair(Auto_file = cfg.get(cfg_section, "cms-key")) +cms_certs = rpki.x509.X509_chain(Auto_files = cfg.multiget(cfg_section, "cms-cert")) -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")) - -rpki.https.server(privateKey = privateKey, - certChain = certChain, - host = cfg.get(section, "https-host"), - port = int(cfg.get(section, "https-port")), - handlers = { cfg.get(section, "https-url") : handler }) +rpki.https.server(privateKey = rpki.x509.RSA_Keypair(Auto_file = cfg.get(cfg_section, "https-key")), + certChain = rpki.x509.X509_chain(Auto_files = cfg.multiget(cfg_section, "https-cert")), + host = cfg.get(cfg_section, "https-host"), + port = int(cfg.get(cfg_section, "https-port")), + handlers = { cfg.get(cfg_section, "https-url") : handler }) |