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

mac 对于这个包 测试 wss, 会出现SSL握手失败。。 #12

Open
sun8029554 opened this issue Mar 4, 2020 · 2 comments
Open

Comments

@sun8029554
Copy link

mac 测试这个包的时候 出现 ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833) ,求指教

@luopeixiong
Copy link

luopeixiong commented Dec 1, 2020

mac 测试这个包的时候 出现 ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833) ,求指教

我也遇到这个问题 翻阅了源码和wss ssl的相关资料 通过修稿源码ssl获取函数 成功通过 你可以试试~
import ssl

from aiowebsocket import parts

ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE

_parse_uri = parts.parse_uri

def parse_uri(uri: str):
scheme, host, port, resource, ssl = _parse_uri(uri)
ssl = ssl_context if ssl else ssl
return scheme, host, port, resource, ssl

parts.parse_uri = parse_uri

from aiowebsocket.converses import AioWebSocket

将代码的ssl自己设置

@seamanzgs
Copy link

mac 测试这个包的时候 出现 ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833) ,求指教

我也遇到这个问题 翻阅了源码和wss ssl的相关资料 通过修稿源码ssl获取函数 成功通过 你可以试试~ import ssl

from aiowebsocket import parts

ssl_context = ssl.create_default_context() ssl_context.check_hostname = False ssl_context.verify_mode = ssl.CERT_NONE

_parse_uri = parts.parse_uri

def parse_uri(uri: str): scheme, host, port, resource, ssl = _parse_uri(uri) ssl = ssl_context if ssl else ssl return scheme, host, port, resource, ssl

parts.parse_uri = parse_uri

from aiowebsocket.converses import AioWebSocket

将代码的ssl自己设置

我的错误代码是1091,请问怎么改?scheme,host,port,这些变量有什么作用?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants