SSLError(SSLError(1,u'[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:661)

时间:2019-05-11 06:28:40

标签: python flask auth0

尝试使用auth0进行身份验证时出现SSL错误。 这是我正在使用的代码 https://github.com/auth0-samples/auth0-python-web-app

只需更改一些基本信息,例如客户端ID和客户端密码。但是在运行应用程序时出现此错误

{"message":"HTTPSConnectionPool(host='firstapplication.hostname.io', port=443): Max retries exceeded with url: /oauth/token (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)'),))"}

有人可以帮助我摆脱困境吗?

1 个答案:

答案 0 :(得分:0)

由于您未通过有效的证书,因此无法验证证书。您可以将验证请求文件与

一起传递给您
--http_port

或者您可以跳过证书验证

requests.get('https://somewebsite.com', verify='/path/to/certfile')
相关问题