diff options
author | liris <liris.pp@gmail.com> | 2014-08-26 10:33:38 +0900 |
---|---|---|
committer | liris <liris.pp@gmail.com> | 2014-08-26 10:33:38 +0900 |
commit | 748f56bbe015140e5b329731b76aecc9e4fde94f (patch) | |
tree | e3f72aa333c2aec8782abb3c69ab233044e750a9 | |
parent | aa66645afc6c8bc72e84e9de63d1752cf9ebad14 (diff) | |
download | websocket-client-ssl.tar.gz |
- add document how to disable ssl cert verification.ssl
- refs #101
-rw-r--r-- | README.rst | 19 | ||||
-rw-r--r-- | websocket/_core.py | 2 |
2 files changed, 21 insertions, 0 deletions
@@ -118,6 +118,25 @@ JavaScript websocket-like API example:: ws.run_forever() +FAQ +============ + +How to disable ssl cert verification? +---------------------------------------- + +Please set sslopt to {"cert_reqs": ssl.CERT_NONE}. + + ws = websocket.WebSocketApp("https://echo.websocket.org") + ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}) + + ws = websocket.create_connection("https://echo.websocket.org", + sslopt={"cert_reqs": ssl.CERT_NONE}) + + ws = websocket.WebSocket(sslopt={"cert_reqs": ssl.CERT_NONE}) + ws.connect("https://echo.websocket.org") + + + wsdump.py ============ diff --git a/websocket/_core.py b/websocket/_core.py index 2776853..fba7e70 100644 --- a/websocket/_core.py +++ b/websocket/_core.py @@ -206,6 +206,8 @@ def create_connection(url, timeout=None, **options): "http_proxy_host" - http proxy host name. "http_proxy_port" - http proxy port. If not set, set to 80. "enable_multithread" -> enable lock for multithread. + "sockopt" -> socket options + "sslopt" -> ssl option """ sockopt = options.get("sockopt", []) sslopt = options.get("sslopt", {}) |