Fixed SERVER_ROOT directory, improved sni_challenge test

This commit is contained in:
James Kasten 2012-08-08 20:06:41 -04:00
parent 9e96153d84
commit 7c814bd7b1
2 changed files with 14 additions and 9 deletions

View file

@ -1,5 +1,5 @@
# Apache server root directory
SERVER_ROOT = "/etc/apache2"
SERVER_ROOT = "/etc/apache2/"
# Configuration file directory for trustify
CONFIG_DIR = "/etc/trustify/"
# Working directory for trustify
@ -14,3 +14,6 @@ APACHE_CHALLENGE_CONF = CONFIG_DIR + "choc_sni_cert_challenge.conf"
# Byte size of S and Nonce
S_SIZE = 32
NONCE_SIZE = 32
# bits of hashcash to generate
difficulty = 23

View file

@ -281,15 +281,17 @@ def main():
challenges = [("example.com", y, nonce, "1.3.3.7"), ("www.example.com",y2, nonce2, "1.3.3.7")]
#challenges = [("127.0.0.1", y, nonce, "1.3.3.7"), ("localhost", y2, nonce2, "1.3.3.7")]
perform_sni_cert_challenge(challenges, csr, key, config)
if perform_sni_cert_challenge(challenges, csr, key, config):
# Waste some time without importing time module... just for testing
for i in range(0, 12000):
if i % 2000 == 0:
print "Waiting:", i
# Waste some time without importing time module... just for testing
for i in range(0, 12000):
if i % 2000 == 0:
print "Waiting:", i
print "Cleaning up"
cleanup(challenges, config)
print "Cleaning up"
cleanup(challenges, config)
else:
print "Failed SNI challenge..."
if __name__ == "__main__":
main()