Skip to content

Commit

Permalink
Implement AsyncOpenSearch() parameter ssl_assert_hostname to allow …
Browse files Browse the repository at this point in the history
…disabling SSL hostname verification

Signed-off-by: merlinz01 <[email protected]>
  • Loading branch information
merlinz01 committed Nov 10, 2024
1 parent 6fa54a7 commit 9c9692b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
### Added
- Added `AsyncSearch#collapse` ([827](https://github.com/opensearch-project/opensearch-py/pull/827))
- Implement `ssl_assert_hostname` boolean parameter for `AsyncOpenSearch.__init__()` ([#dummy](https://github.com/opensearch-project/opensearch-py/pull/dummy))
### Changed
### Deprecated
### Removed
Expand Down
3 changes: 2 additions & 1 deletion opensearchpy/_async/http_aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(
client_cert: Any = None,
client_key: Any = None,
ssl_version: Any = None,
ssl_assert_hostname: bool = True,
ssl_assert_fingerprint: Any = None,
maxsize: Optional[int] = 10,
headers: Any = None,
Expand Down Expand Up @@ -177,7 +178,7 @@ def __init__(

if verify_certs:
ssl_context.verify_mode = ssl.CERT_REQUIRED
ssl_context.check_hostname = True
ssl_context.check_hostname = ssl_assert_hostname
else:
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE
Expand Down

0 comments on commit 9c9692b

Please sign in to comment.