diff --git a/axeman/core.py b/axeman/core.py index d67a4c2..d521a6a 100644 --- a/axeman/core.py +++ b/axeman/core.py @@ -195,6 +195,11 @@ def process_worker(result_info): crypto.load_certificate(crypto.FILETYPE_ASN1, cert.CertData) ) + cert_data['timestamp'] = "" + + if mtl.Timestamp: + cert_data['timestamp'] = mtl.Timestamp + cert_data.update({ "leaf_cert": certlib.dump_cert(chain[0]), "chain": [certlib.dump_cert(x) for x in chain[1:]] @@ -208,14 +213,17 @@ def process_worker(result_info): chain_hash = hashlib.sha256("".join([x['as_der'] for x in cert_data['chain']]).encode('ascii')).hexdigest() - # header = "url, cert_index, chain_hash, cert_der, all_domains, not_before, not_after" + # NOT USED, this was the header earlier header = "url, cert_index, chain_hash, cert_der, all_domains, not_before, not_after" + # header = "timestamp, url, cert_index, all_domains, CN, not_before, not_after" lines.append( ",".join([ + str(cert_data['timestamp']), result_info['log_info']['url'], str(entry['cert_index']), - chain_hash, - cert_data['leaf_cert']['as_der'], + # chain_hash, + # cert_data['leaf_cert']['as_der'], ' '.join(cert_data['leaf_cert']['all_domains']), + cert_data['leaf_cert']['subject']['CN'], str(cert_data['leaf_cert']['not_before']), str(cert_data['leaf_cert']['not_after']) ]) + "\n"