Skip to content

Commit

Permalink
Extract log_id from task
Browse files Browse the repository at this point in the history
The entire issuance object is passed as an argument to the
cert_by_issuance task, so we must extract the log_id from the "id"
field.
  • Loading branch information
king-alexander committed Mar 22, 2023
1 parent 6953121 commit 7899ee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/load_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def group_update_domain(domain, max_expired_date, verbose=False, dry_run=False):
data = base64.b64decode(result["data"]) # encoded in ASN.1 DER
pem = ssl.DER_cert_to_PEM_cert(data)
cert, is_precert = Cert.from_pem(pem)
cert.log_id = task.get("args")[0] # get log_id from task
cert.log_id = task.get("args")[0]["id"] # get log_id from task
if is_precert:
# if this is a precert, we save to the precert collection
with context_managers.switch_collection(Cert, "precerts"):
Expand Down

0 comments on commit 7899ee4

Please sign in to comment.