Skip to content

Commit

Permalink
Merge branch 'release/0.4.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
3c7 committed Nov 29, 2022
2 parents b97da13 + 61c06f5 commit 1616bc9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
3 changes: 1 addition & 2 deletions common_osint_model/models/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def from_shodan(cls, d: Dict):
def from_censys(cls, d: Dict):
"""Creates an instance of this class based on Censys data given as dictionary."""
if all(key not in d for key in ["common_name", "locality", "organization", "organizational_unit", "province"]):
raise KeyError("The dictionary given to TLSComponentCertificateEntity.from_shodan is missing the typical "
raise KeyError("The dictionary given to TLSComponentCertificateEntity.from_censys is missing the typical "
"censys keys.")

c = d.get("country", [])
Expand Down Expand Up @@ -233,7 +233,6 @@ def from_shodan(cls, d: Dict):
if len(certificate_chain) == 1:
pem = certificate_chain[0]
cert = load_pem_x509_certificate(pem.encode("utf-8"))
trusted = False
# If there are multiple certificates given, we need to loop over them and compare the common name. This _can_
# lead to ValueError if the certificates are malformed, such as empty Country values etc. This is why
# >>> cert.subject.get_attributes_for_oid(OID_COMMON_NAME)
Expand Down
54 changes: 27 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "common-osint-model"
version = "0.4.12"
version = "0.4.13"
description = "Converting data from services like BinaryEdge, Censys and Shodan to a common data model."
authors = ["3c7 <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 1616bc9

Please sign in to comment.