Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions axeman/certlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

DOWNLOAD = "https://{}/ct/v1/get-entries?start={}&end={}"

from construct import Struct, Byte, Int16ub, Int64ub, Enum, Bytes, Int24ub, this, GreedyBytes, GreedyRange, Terminated, Embedded
from construct import Struct, Byte, Int16ub, Int64ub, Enum, Bytes, Int24ub, this, GreedyBytes, GreedyRange, Terminated

MerkleTreeHeader = Struct(
"Version" / Byte,
Expand All @@ -34,7 +34,7 @@

PreCertEntry = Struct(
"LeafCert" / Certificate,
Embedded(CertificateChain),
"CertificateChain" / CertificateChain,
Terminated
)

Expand Down
4 changes: 2 additions & 2 deletions axeman/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def process_worker(result_info):
extra_data = certlib.PreCertEntry.parse(base64.b64decode(entry['extra_data']))
chain = [crypto.load_certificate(crypto.FILETYPE_ASN1, extra_data.LeafCert.CertData)]

for cert in extra_data.Chain:
for cert in extra_data.CertificateChain.Chain:
chain.append(
crypto.load_certificate(crypto.FILETYPE_ASN1, cert.CertData)
)
Expand Down Expand Up @@ -248,7 +248,7 @@ async def get_certs_and_print():
print(log['description'])
print(" \- URL: {}".format(log['url']))
print(" \- Owner: {}".format(log_info['operated_by']))
print(" \- Cert Count: {}".format(locale.format("%d", log_info['tree_size']-1, grouping=True)))
print(" \- Cert Count: {}".format(locale.format_string("%d", log_info['tree_size']-1, grouping=True)))
print(" \- Max Block Size: {}\n".format(log_info['block_size']))

def main():
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ uvloop
aiohttp
aioprocessing
PyOpenSSL
construct==2.9.52
construct