summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
Diffstat (limited to 'monitor')
-rwxr-xr-xmonitor/josef_experimental.py17
-rw-r--r--monitor/josef_lib.py1
-rwxr-xr-xmonitor/josef_mover.py1
3 files changed, 12 insertions, 7 deletions
diff --git a/monitor/josef_experimental.py b/monitor/josef_experimental.py
index 8e9e706..6d1102e 100755
--- a/monitor/josef_experimental.py
+++ b/monitor/josef_experimental.py
@@ -133,6 +133,7 @@ def parse_entry(e, idx, log):
s = log["name"]
s += sep + str(idx) # index
+ s += sep + str(e["timestamp"])
s += sep + e["serial"] # cert serial number
s += sep + e["subject"] # Subject
if "SAN" in e:
@@ -191,17 +192,19 @@ if __name__ == '__main__':
# Experimental
- if False:
- log = CTLOGS[1]
+ if True:
+ log = CTLOGS[2]
entries = get_entries(log["url"],187851 ,187851)["entries"]
entry = entries[0]
- print check_domain_all(entry)
- # res = check_domain_extended(entry)
- # print parse_entry(res,0,log)
+ # print extract_original_entry(entry)[1]
+ # print check_domain_all(entry)
+ res = check_domain_extended(entry)
+ # print res
+ print parse_entry(res,0,log)
# Data gathering for Niklas
- if True:
- logs = [CTLOGS[1]] #,CTLOGS[4],CTLOGS[7],CTLOGS[8],CTLOGS[9]]
+ if False:
+ logs = [CTLOGS[2]] #,CTLOGS[4],CTLOGS[7],CTLOGS[8],CTLOGS[9]]
for log in logs:
filename = log["name"] + "_content.txt"
if os.path.exists(filename):
diff --git a/monitor/josef_lib.py b/monitor/josef_lib.py
index 24c74c3..1a9085f 100644
--- a/monitor/josef_lib.py
+++ b/monitor/josef_lib.py
@@ -118,6 +118,7 @@ def check_domain_extended(raw_entry, log=None):
cert_info["chain_length"] = str(len(orig_entry[0]))
cert_info["validation"] = get_validation_type(cert_info["policy"])
cert_info["in_mozilla"] = validate_cert(orig_entry[0][-1])
+ cert_info["timestamp"] = orig_entry[1]
# print my_get_all_cert_info(orig_entry[0][-1])
if log:
cert_info["log"] = log[8:-1] # strip generic URL stuff
diff --git a/monitor/josef_mover.py b/monitor/josef_mover.py
index 3a5ae42..0776062 100755
--- a/monitor/josef_mover.py
+++ b/monitor/josef_mover.py
@@ -191,6 +191,7 @@ def check_submission_inner(d_log, item, inclusions):
else:
res = add_chain(d_log["url"], {"chain" : submission})
# print res
+ print res
if not is_new_timestamp(res["timestamp"]):
inclusions.append(d_log["name"])