Skip to content

Commit

Permalink
Improve ANSSI cert_id extraction from scheme site.
Browse files Browse the repository at this point in the history
  • Loading branch information
J08nY committed Nov 4, 2024
1 parent e303b6f commit 28cf5d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sec_certs/sample/cc_scheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def _get_france(url, enhanced, artifacts, name) -> list[dict[str, Any]]: # noqa
elif "Développeur" in label:
cert["developer"] = value
elif "Référence du certificat" in label:
cert["cert_id"] = value
cert["cert_id"] = value if not value or value.startswith("ANSSI") else "ANSSI-CC" + value
elif "Niveau" in label:
cert["level"] = value
elif "Date de fin de validité" in label:
Expand All @@ -309,7 +309,7 @@ def _get_france(url, enhanced, artifacts, name) -> list[dict[str, Any]]: # noqa
label = tr.find("th").text
value = sns(tr.find("td").text)
if "Référence du certificat" in label:
e["cert_id"] = value
e["cert_id"] = value if not value or value.startswith("ANSSI") else "ANSSI-CC-" + value
elif "Date de certification" in label:
e["certification_date"] = value
elif "Date de fin de validité" in label:
Expand Down

0 comments on commit 28cf5d3

Please sign in to comment.