From 5bc2eee4b046edf3babb20bf6c084b69bfbaa01f Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 11 Jul 2012 06:14:25 +0000 Subject: [PATCH] using chocolate server (ec2)'s parameters in sni_challenge (these are just as good as any hardcoded value, and this way we don't have uncommited changes on our test server) --- client-webserver/sni_challenge.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client-webserver/sni_challenge.py b/client-webserver/sni_challenge.py index fbc232805..d68d06b96 100644 --- a/client-webserver/sni_challenge.py +++ b/client-webserver/sni_challenge.py @@ -9,7 +9,7 @@ from shutil import move from os import remove, close import binascii -CHOC_DIR = "/home/james/Documents/apache_choc/" +CHOC_DIR = "/home/ubuntu/chocolate/client-webserver/" CHOC_CERT_CONF = "choc_cert_extensions.cnf" OPTIONS_SSL_CONF = CHOC_DIR + "options-ssl.conf" APACHE_CHALLENGE_CONF = CHOC_DIR + "choc_sni_cert_challenge.conf" @@ -133,8 +133,8 @@ def perform_sni_cert_challenge(listSNITuple, csr, key): apache_restart() def main(): - key = CHOC_DIR + "testing.key" - csr = CHOC_DIR + "choc.csr" + key = CHOC_DIR + "key.pem" + csr = CHOC_DIR + "req.pem" testkey = RSA.importKey(open(key).read()) @@ -153,7 +153,7 @@ def main(): nonce = binascii.hexlify(nonce) nonce2 = binascii.hexlify(nonce2) - perform_sni_cert_challenge([("127.0.0.1", y, nonce, "1.3.3.7"), ("localhost",y2, nonce2, "1.3.3.7")], csr, key) + perform_sni_cert_challenge([("example.com", y, nonce, "1.3.3.7"), ("www.example.com",y2, nonce2, "1.3.3.7")], csr, key) if __name__ == "__main__": main()