python-3.x - Windows 10 SSL 证书验证失败

标签 python-3.x ssl ssl-certificate

我的错误今天出现了(在它工作正常之前)。我的 SSL 证书验证失败。我已根据网络解决方案将库更新为最新版本:

Python 3.6.5

certifi==2018.8.24
requests==2.19.1
urllib3==1.23

也许证书不知何故过时了? (我一无所知)

操作系统: 赢10 重复性: 100%

Traceback (most recent call last):
  File "...\venv\lib\site-packages\urllib3\connectionpool.py", line 594, in urlopen
    self._prepare_proxy(conn)
  File "...\venv\lib\site-packages\urllib3\connectionpool.py", line 810, in _prepare_proxy
    conn.connect()
  File "...\venv\lib\site-packages\urllib3\connection.py", line 326, in connect
    ssl_context=context)
  File "...\venv\lib\site-packages\urllib3\util\ssl_.py", line 325, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Users\htrela\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "C:\Users\htrela\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 814, in __init__
    self.do_handshake()
  File "C:\Users\htrela\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "C:\Users\htrela\AppData\Local\Programs\Python\Python36-32\lib\ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\venv\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "...\venv\lib\site-packages\urllib3\connectionpool.py", line 630, in urlopen
    raise SSLError(e)
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)

最佳答案

证书可能已经过期,您查看过证书属性了吗? – 罗伯特 8 月 31 日 18:01

是的,是这样的,但是我无法自己检查。负责人肯定地回答了我。

关于python-3.x - Windows 10 SSL 证书验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52078467/

相关文章:

python - 新创建的 conda envs 是否继承了基础 env 的所有包?

apache - 使用 htaccess 将 HTTPS 重定向到单个 PHP 文件

amazon-web-services - 错误 : action failed after 10 attempts: failed to connect to the management cluster. 获取 https ://127. 0.0.1 :43343/api? 超时 = 30 秒:EOF

python - 如何以特定格式将文件作为参数传递给 Python 中的参数?

python - 如何可视化 BaseHTTPRequestHandler 的主体部分

ssl - 使用 OpenSSL 测试 SSL/TLS 客户端身份验证

java - Tomcat 服务器上的 SSL 证书

java - 将公共(public)证书导入 keystore 时出错

python - 编写标准差函数

ssl - SAML SP 元数据 : Self-signed Certifcate or CA Certificate, 最佳实践是什么?