diff options
-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", {}) |