High Sierraにしたらopensllとかcurlでエラーが出るようになって困った


$ curl -i https://example.com
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to example.com:443


$ openssl s_client -connect example.com:443 -showcerts
140735838761864:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22/libressl/ssl/s23_lib.c:124:
no peer certificate available
No client certificate CA names sent
SSL handshake has read 0 bytes and written 318 bytes
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated

どうやらHigh SierraはopensslからLibreSSLに変わったらしい。

$ curl -V
curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy

$ openssl version -a
LibreSSL 2.2.7
built on: date not available
platform: information not available
options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) blowfish(idx)
compiler: information not available
OPENSSLDIR: "/private/etc/ssl"


$ brew install openssl curl
$ echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.bash_profile
$ echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bash_profile


Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.