aboutsummaryrefslogtreecommitdiff
path: root/scripts/http-client.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-12-24 09:31:48 +0000
committerRob Austein <sra@hactrn.net>2007-12-24 09:31:48 +0000
commit4d7072bd10f807558dfd60c2a3e65fe6584bcdb3 (patch)
tree291536b8a8e9c26ff5ac46d988b5587f2d9fc75d /scripts/http-client.py
parent9bd1ce773943b587f83c91c77de7e379df421c63 (diff)
Teach config parser about default sections.
svn path=/scripts/Makefile; revision=1439
Diffstat (limited to 'scripts/http-client.py')
-rw-r--r--scripts/http-client.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/http-client.py b/scripts/http-client.py
index 3e5ec618..5829ac4b 100644
--- a/scripts/http-client.py
+++ b/scripts/http-client.py
@@ -27,11 +27,10 @@ if argv:
print __doc__
raise RuntimeError, "Unexpected arguments %s" % argv
-cfg = rpki.config.parser(cfg_file)
-section = "client"
+cfg = rpki.config.parser(cfg_file, "client")
-print rpki.https.client(privateKey = rpki.x509.RSA(Auto_file = cfg.get( section, "https-key")),
- certChain = rpki.x509.X509_chain(Auto_files = cfg.multiget(section, "https-cert")),
- x509TrustList = rpki.x509.X509_chain(Auto_files = cfg.multiget(section, "https-ta")),
- url = cfg.get(section, "https-url"),
+print rpki.https.client(privateKey = rpki.x509.RSA(Auto_file = cfg.get("https-key")),
+ certChain = rpki.x509.X509_chain(Auto_files = cfg.multiget("https-cert")),
+ x509TrustList = rpki.x509.X509_chain(Auto_files = cfg.multiget("https-ta")),
+ url = cfg.get("https-url"),
msg = msg)