summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorJosef Gustafsson <josef.gson@gmail.com>2015-09-28 13:24:08 +0200
committerJosef Gustafsson <josef.gson@gmail.com>2015-09-28 13:24:08 +0200
commit4849a5487be2ed1a565b82c7a227fca1cec099ef (patch)
tree9b13619e17dd22e56225c430c1b77b6f11c9ea12 /monitor
parentdf4d69358f7ec6115d835cabe47e749aa04ba6ff (diff)
debugging
Diffstat (limited to 'monitor')
-rw-r--r--monitor/josef_lib.py2
-rwxr-xr-xmonitor/josef_monitor.py33
-rw-r--r--monitor/monitor_conf.py10
3 files changed, 22 insertions, 23 deletions
diff --git a/monitor/josef_lib.py b/monitor/josef_lib.py
index 1d35a89..c454f30 100644
--- a/monitor/josef_lib.py
+++ b/monitor/josef_lib.py
@@ -389,6 +389,8 @@ def check_signature(baseurl, signature, data, publickey=None):
rsa_key = RSA.importKey(publickey)
verifier = PKCS1_v1_5.new(rsa_key)
+ # print "HASH: ",h
+ # print "UNPACKED SIGNATURE: ",unpacked_signature
assert verifier.verify(h, unpacked_signature), \
"could not verify RSA signature"
diff --git a/monitor/josef_monitor.py b/monitor/josef_monitor.py
index f33039a..6c189ca 100755
--- a/monitor/josef_monitor.py
+++ b/monitor/josef_monitor.py
@@ -133,11 +133,12 @@ class ctlog:
self.log("Failed to fetch STH. " +str(e))
return
- try:
- check_sth_signature(self.url, new_sth, base64.b64decode(self.key))
- except:
- self.log("ERROR: Could not verify STH signature")
- print "ERROR: Could not verify STH signature from " + self.url
+ # try:
+ check_sth_signature(self.url, new_sth, base64.b64decode(self.key))
+ # check_sth_signature(self.url, new_sth, None)
+ # except:
+ # self.log("ERROR: Could not verify STH signature")
+ # print "ERROR: Could not verify STH signature from " + self.url
sth_time = datetime.datetime.fromtimestamp(new_sth['timestamp'] / 1000, UTC()).strftime("%Y-%m-%d %H:%M:%S")
if new_sth["timestamp"] != self.sth["timestamp"]:
@@ -443,17 +444,17 @@ def main(args):
open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict))
# Something went horribly wrong!
- except Exception, err:
- print Exception, err
- for log in logs:
- log.save()
-
- # Save info about monitored domains
- domain_dict = []
- if len(monitored_domains) > 0:
- for md in monitored_domains:
- domain_dict.append(md.to_dict())
- open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict))
+ # except Exception, err:
+ # print Exception, err
+ # for log in logs:
+ # log.save()
+
+ # # Save info about monitored domains
+ # domain_dict = []
+ # if len(monitored_domains) > 0:
+ # for md in monitored_domains:
+ # domain_dict.append(md.to_dict())
+ # open(CONFIG.DOMAINS_FILE, 'w').write(json.dumps(domain_dict))
diff --git a/monitor/monitor_conf.py b/monitor/monitor_conf.py
index f5f7941..5b935b3 100644
--- a/monitor/monitor_conf.py
+++ b/monitor/monitor_conf.py
@@ -40,13 +40,13 @@ CTLOGS = [
"url" : "https://plausible.ct.nordu.net/",
"key" : "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9UV9+jO2MCTzkabodO2F7LM03MUBc8MrdAtkcW6v6GA9taTTw9QJqofm0BbdAsbtJL/unyEf0zIkRgXjjzaYqQ==",
"id" : "qucLfzy41WbIbC8Wl5yfRF9pqw60U1WJsvd6AwEE880=",
- "build" : False},
+ "build" : True},
{"name" : "digicert",
"url" : "https://ct1.digicert-ct.com/log/",
"key" : "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAkbFvhu7gkAW6MHSrBlpE1n4+HCFRkC5OLAjgqhkTH+/uzSfSl8ois8ZxAD2NgaTZe1M9akhYlrYkes4JECs6A==",
"id" : "VhQGmi/XwuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0=",
- "build" : False},
+ "build" : True},
{"name" : "izenpe",
"url" : "https://ct.izenpe.com/",
@@ -70,7 +70,7 @@ CTLOGS = [
"url" : "https://ct.googleapis.com/rocketeer/",
"key" : "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIFsYyDzBi7MxCAC/oJBXK7dHjG+1aLCOkHjpoHPqTyghLpzA9BYbqvnV16mAw04vUjyYASVGJCUoI3ctBcJAeg==",
"id": "7ku9t3XOYLrhQmkfq+GeZqMPfl+wctiDAMR7iXqo/cs=",
- "build" : False},
+ "build" : True},
{"name" : "symantec",
"url" : "https://ct.ws.symantec.com/",
@@ -84,10 +84,6 @@ CTLOGS = [
"id" : "rDua7X+pZ0dXFZ5tfVdWcvnZgQCUHpve/+yhMTt1eC0=",
"build" : True},
- # {"name" : "devp",
- # "url" : "https://localhost:8080/",
- # "key" : "NA",
- # "id" : "NA"},
]