Skip to content

Commit

Permalink
Verify partial ssl chains to allow non-pinned certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
DCSBL committed Jan 19, 2025
1 parent b15e0f8 commit 268a603
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions homewizard_energy/v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ async def _get_ssl_context(self) -> ssl.SSLContext:

def _build_ssl_context() -> ssl.SSLContext:
context = ssl.create_default_context(cadata=CACERT)
context.verify_flags = ssl.VERIFY_X509_PARTIAL_CHAIN # pylint: disable=no-member
if self._identifier is not None:
context.hostname_checks_common_name = True
else:
Expand Down

0 comments on commit 268a603

Please sign in to comment.