Skip to content

Commit

Permalink
Update base64 decoding
Browse files Browse the repository at this point in the history
The DER-encoded X.509 certificate data is no longer buried in a
sub-object, so we decode the result directly.
  • Loading branch information
king-alexander committed Jul 13, 2023
1 parent a03bebb commit 4952803
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 @@ -140,7 +140,7 @@ def group_update_domain(domain, max_expired_date, verbose=False, dry_run=False):

# create x509 certificates from the results
for task, result in tasks_to_results:
data = base64.b64decode(result["data"]) # encoded in ASN.1 DER
data = base64.b64decode(result) # 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]["id"] # get log_id from task
Expand Down

0 comments on commit 4952803

Please sign in to comment.