最近この証明書を更新したローカルサイトがあります。証明書をcerts.pem
ファイルに保存し、いくつかのツールと接続しようとしました。以下の操作は、Ubuntu 14.10のボックスで行われます。pythonリクエストライブラリでSSL証明書の確認に失敗しました
私が実行します。
openssl s_client -connect mylocalsite:8080 -verify 9 -CAfile certs.pem
私はVerify return code: 0 (ok)
を取得し、その後、私は実行します。
wget https://mylocalsite:8080 --ca-certificate=certs.pem
は私が取得:
--2016-06-15 01:53:00-- https://mylocalsite:8080/ Resolving mylocalsite (mylocalsite)... 10.41.13.26 Connecting to mylocalsite (mylocalsite)|10.41.13.26|:8080... connected.
をだから、証明書が正常に動作するようで、私は同じボックスにpython 3.4.3で2.10.0のリクエストを使用します:
import requests
requests.get('https://mylocalsite:8080', verify='/path/to/certs.pem')
私はSSL関連の事に全く新たなんだ
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
を取得します。おそらくここで間違っている可能性がありますか?
ありがとうございます!
このhttp://stackoverflow.com/questions/34085552/sslerror-bad-handshake-に関連している可能性が必要ですpython-requests – dmitryro