Use use ssl_context or don't but don't mix (#714)
* Use original SSL process and add SSLContext Not going to deprecate and replace with SSLContext. But instead give option for using SSLContext next to the original way of handling SSL.
This commit is contained in:
@@ -97,9 +97,9 @@ Elastic Cloud (and SSL) use-case::
|
||||
Using SSL Context with a self-signed cert use-case::
|
||||
|
||||
>>> from elasticsearch import Elasticsearch
|
||||
>>> from elasticsearch.connection import create_ssl_context
|
||||
>>> from ssl import create_default_context
|
||||
|
||||
>>> context = create_ssl_context(cafile="path/to/cafile.pem")
|
||||
>>> context = create_default_context(cafile="path/to/cafile.pem")
|
||||
>>> es = Elasticsearch("https://elasticsearch.url:port", ssl_context=context, http_auth=('elastic','yourpassword'))
|
||||
>>> es.info()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user