OSXのcurlで正しいSSL証明書でInvalid certificate chainと警告が出る
最新版のchromeでは正常に表示される証明書がcurl経由だとエラーになる。
* SSL certificate problem: Invalid certificate chain curl: (60) SSL certificate problem: Invalid certificate chain More details here: http://curl.haxx.se/docs/sslcerts.html
どうもバグがあるようなのだけど、証明書とkeychainは触り始めると深淵なので一旦brewでcurlを入れる。
brew install curl --with-openssl && brew link curl --force
更新前
# curl -V curl 7.30.0 (x86_64-apple-darwin13.0) libcurl/7.30.0 SecureTransport zlib/1.2.5 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz
更新後
# curl -V curl 7.46.0 (x86_64-apple-darwin13.4.0) libcurl/7.46.0 OpenSSL/1.0.2e zlib/1.2.5 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
私の環境では無事警告が出なくなりました。
問題があったらunlinkで切り戻せば大丈夫。
参考