diff options
Diffstat (limited to 'scripts/http-client.py')
-rw-r--r-- | scripts/http-client.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/http-client.py b/scripts/http-client.py index 53150a9c..18fcbf9c 100644 --- a/scripts/http-client.py +++ b/scripts/http-client.py @@ -2,5 +2,17 @@ import rpki.config, rpki.https -certInfo = rpki.https.CertInfo(rpki.config.parser("http-demo.conf"), "client") -print rpki.https.client(certInfo=certInfo, msg="This is a test. This is only a test. Had this been real you would now be really confused.\n") +msg = "This is a test. This is only a test. Had this been real you would now be really confused.\n" + +cfg = rpki.config.parser("http-demo.conf") +section = "client" + +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")) + +x509TrustList = rpki.x509.X509_chain() +x509TrustList.load_from_PEM(cfg.multiget(section, "https-ta")) + +print rpki.https.client(privateKey=privateKey, certChain=certChain, x509TrustList=x509TrustList, msg=msg) |