diff options
author | Magnus Ahltorp <map@kth.se> | 2014-09-25 12:23:00 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2014-09-25 12:23:00 +0200 |
commit | 4899f85a4bfe73d166667348ffef77312ca85751 (patch) | |
tree | 63528d08f28fa96c0447c0f480964bfd5994a2ea /tools/submitcert.py | |
parent | d0c0ab627445f1dcb8eb3dcdb7c6bda3809a088d (diff) |
submitcert: Validate SCT and compare log idtesttools3
Diffstat (limited to 'tools/submitcert.py')
-rwxr-xr-x | tools/submitcert.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/submitcert.py b/tools/submitcert.py index 7844dda..702ffb3 100755 --- a/tools/submitcert.py +++ b/tools/submitcert.py @@ -13,12 +13,31 @@ certfile = sys.argv[2] lookup_in_log = True +publickeys = { + "https://ct.googleapis.com/pilot/": + "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEfahLEimAoz2t01p3uMziiLOl/fHTD" + "M0YDOhBRuiBARsV4UvxG2LdNgoIGLrtCzWE0J5APC2em4JlvR8EEEFMoA==", + + "https://127.0.0.1:8080/": + "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4qWq6afhBUi0OdcWUYhyJLNXTkGqQ9" + "PMS5lqoCgkV2h1ZvpNjBH2u8UbgcOQwqDo66z6BWQJGolozZYmNHE2kQ==", + + "https://flimsy.ct.nordu.net/": + "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4qWq6afhBUi0OdcWUYhyJLNXTkGqQ9" + "PMS5lqoCgkV2h1ZvpNjBH2u8UbgcOQwqDo66z6BWQJGolozZYmNHE2kQ==", +} + + certs = get_certs_from_file(certfile) result = add_chain(baseurl, {"chain":certs}) print result +publickey = base64.decodestring(publickeys[baseurl]) + +check_signature(publickey, base64.decodestring(certs[0]), result) + for cert in certs: print get_cert_info(base64.decodestring(cert)) |