開発
TLSインスペクション環境における 自己証明書エラーの対応
2025/11/13公開
企業においては、TLSインスペクション環境であることもありいろんなアプリやコマンドで自己証明書のエラーが出ると思うので、エラーの解決方法をまとめました。
外部接続するようなコマンドで
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)
のエラーが出た場合、
Ubuntu では以下の対応
/usr/local/share/ca-certificates/
sudo update-ca-certificates
CentOS7 では以下の対応
/usr/share/pki/ca-trust-source/anchors/
sudo update-ca-trust
PHP は以下のエラーで、OSに設定したら解決する
PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:0A000086:SSL routines::certificate verify failed in Command line code on line 1
Nodo.js は以下のエラーで、OS設定だけだどダメで、以下の環境変数が必要。
Error: self-signed certificate in certificate chain
export NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/netskope-root-ca.crt
環境に起因するようなエラーに悩む時間はもったいないので迅速に解決したいですね。
今後も同じようなエラーに悩む皆さんのためになるような情報を展開します!