Skip to content

Commit

Permalink
Merge pull request #63 from cisagov/improvement/update-search-requests
Browse files Browse the repository at this point in the history
Update CT Search request
  • Loading branch information
king-alexander committed Jul 13, 2023
2 parents 8db33ba + 6a8de06 commit 360757f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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
2 changes: 1 addition & 1 deletion src/admiral/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""This file defines the version of this module."""
__version__ = "1.3.2"
__version__ = "1.3.4"
4 changes: 2 additions & 2 deletions src/admiral/certs/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def summary_by_domain(domain, subdomains=True):
logger.info(f"Fetching certs from CT log for: {domain}")
url = (
f"https://api.certspotter.com/v1/issuances?domain={domain}&include_subdomains={subdomains}"
f"&expand=dns_names&expand=cert"
f"&expand=dns_names&expand=cert_der"
)
req = requests.get(
url,
Expand Down Expand Up @@ -82,4 +82,4 @@ def cert_by_issuance(issuance):
id = issuance["id"]
logger.info(f"Fetching cert data from CT log for id: {id}.")

return issuance["cert"]
return issuance["cert_der"]

0 comments on commit 360757f

Please sign in to comment.