[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[plamo:33697] Python certificate エラー



加藤です。とりあえず問題の報告のみ。

私の環境だけかもしれませんが、get_pkginfo -d をすると TLS のエラーが出
て動きません。最近 Lets Encrypt のルート証明書更新とかあったから?(←
良く知らない)

$ get_pkginfo -d
Traceback (most recent call last):
  File "/usr/lib/python3.9/urllib/request.py", line 1346, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.9/http/client.py", line 1255, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1301, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1250, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.9/http/client.py", line 1010, in _send_output
    self.send(msg)
  File "/usr/lib/python3.9/http/client.py", line 950, in send
    self.connect()
  File "/usr/lib/python3.9/http/client.py", line 1424, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/usr/lib/python3.9/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.9/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)

私の Python 環境だと、証明書としては

$ python -c "import requests;print(requests.certs.where())"
/usr/lib/python3.9/site-packages/certifi/cacert.pem

のやつを見てるようで、これは certifi パッケージとして入ってるようです
ね。この cacert.pem が古いのかな?と思いましたが、リリースとしては最新
ですね。

さて、certifi にシステムで入れた CA 証明書を参照させることはできないの
かな?

-- 
==============================================
((((    加藤泰文
○-○                karma @ jazz.email.ne.jp
==============================================
 (Web Page) http://www.ten-forward.ws/
==============================================


Follow-Ups
[plamo:33698] 証明書エラー (was Pythoncertificateエラー), KATOH Yasufumi
[plamo:33700] Re: Python certificateエラー, KOJIMA Mitsuhiro
[plamo:33701] Re: Python certificateエラー, KOJIMA Mitsuhiro

[検索ページ] [メール一覧]
Plamo ML 公開システム