Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement AsyncOpenSearch() parameter ssl_assert_hostname #843

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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__()` ([843](https://github.com/opensearch-project/opensearch-py/pull/843))
### 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
Loading