Fixed file name and some other small issues.

This commit is contained in:
Roland Hedberg
2015-03-30 11:34:47 +02:00
parent cd2572851e
commit 85e957283e
3 changed files with 4 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python
import logging
import random
import string
import time
import base64

View File

@@ -140,7 +140,7 @@ def test_valid():
assert valid("%d-01-12T00:00:00Z" % (current_year + 1)) == True
this_instance = instant()
time.sleep(1)
assert valid(this_instance) == False # unless on a very fast machine :-)
assert valid(this_instance) is False # unless on a very fast machine :-)
soon = in_a_while(seconds=10)
assert valid(soon) == True
@@ -176,4 +176,4 @@ def test_not_on_or_after():
if __name__ == "__main__":
test_parse_duration_n()
test_str_to_time()

View File

@@ -73,8 +73,8 @@ def generate_cert():
"organization_unit": "DIRG"
}
osw = OpenSSLWrapper()
ca_cert_str = osw.read_str_from_file("/Users/haho0032/Develop/root_cert/localhost.ca.crt")
ca_key_str = osw.read_str_from_file("/Users/haho0032/Develop/root_cert/localhost.ca.key")
ca_cert_str = osw.read_str_from_file("root_cert/localhost.ca.crt")
ca_key_str = osw.read_str_from_file("root_cert/localhost.ca.key")
req_cert_str, req_key_str = osw.create_certificate(cert_info, request=True, sn=sn, key_length=2048)
cert_str = osw.create_cert_signed_certificate(ca_cert_str, ca_key_str, req_cert_str)
return cert_str, req_key_str