diff --git a/websocket/_http.py b/websocket/_http.py index 5c4a638..7cd1da2 100644 --- a/websocket/_http.py +++ b/websocket/_http.py @@ -132,6 +132,9 @@ def _wrap_sni_socket(sock, sslopt, hostname, check_hostname): context.check_hostname = check_hostname if 'ciphers' in sslopt: context.set_ciphers(sslopt['ciphers']) + if 'cert_chain' in sslopt : + certfile,keyfile,password = sslopt['cert_chain'] + context.load_cert_chain(certfile,keyfile,password) return context.wrap_socket( sock,