raggi / openssl-osx-ca

Simple periodic task to sync OSX Keychain certs to Homebrew installed OpenSSL & LibreSSL
Other
225 stars 24 forks source link

Can not import GoAgentX's CA #6

Closed jaggerwang closed 10 years ago

jaggerwang commented 10 years ago

I use GoAgentX as my proxy, and I can browse facebook, twitter, which using https. I installed this formula and run openssl-osx-ca manually. But pip and gem is still not working, curl is OK.

Using curl to access Facebook through GoAgent:

➜ ~ echo $http_proxy http://localhost:7070 ➜ ~ echo $https_proxy http://localhost:7070 ➜ ~ curl -I -v https://www.facebook.com/

<

/usr/local/bin/pip3 run on Sun Apr 13 02:27:14 2014 Downloading/unpacking gevent Getting page https://pypi.python.org/simple/gevent/ Could not fetch URL https://pypi.python.org/simple/gevent/: connection error: unknown error (_ssl.c:2719) Will skip URL https://pypi.python.org/simple/gevent/ when looking for download links for gevent Getting page https://pypi.python.org/simple/ Could not fetch URL https://pypi.python.org/simple/: connection error: unknown error (_ssl.c:2719) Will skip URL https://pypi.python.org/simple/ when looking for download links for gevent Cannot fetch index base URL https://pypi.python.org/simple/ URLs to search for versions for gevent:

ERROR: Could not find a valid gem 'redis' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/latest_specs.4.8.gz)

raggi commented 10 years ago

Did you try gem install -p $http_proxy redis ? If it doesn't work, please add --verbose --debug and paste the output into a code block.

jaggerwang commented 10 years ago

➜ ~ export http_proxy='http://localhost:7070' ➜ ~ export https_proxy='http://localhost:7070' ➜ ~ gem install -p $http_proxy redis ERROR: Could not find a valid gem 'redis' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/latest_specs.4.8.gz) ➜ ~ gem install -p $http_proxy redis --verbose --debug Exception LoadError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/resolv.rb:169 - LoadError ExceptionErrno::EEXIST' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/fileutils.rb:250 - File exists @ dir_s_mkdir - /Users/jagger/.gem/specs/api.rubygems.org%443 Exception Errno::ENOENT' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:294 - No such file or directory @ rb_file_s_stat - /Users/jagger/.gem/specs/api.rubygems.org%443/latest_specs.4.8 ExceptionIO::EAGAINWaitReadable' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/openssl/buffering.rb:182 - Resource temporarily unavailable - read would block Exception OpenSSL::SSL::SSLError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/net/http.rb:920 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ExceptionOpenSSL::SSL::SSLError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/net/http.rb:928 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Exception Gem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/request.rb:101 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz) ExceptionGem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:278 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz) Exception Gem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/spec_fetcher.rb:268 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz) ExceptionGem::SpecificGemNotFoundException' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/dependency_installer.rb:297 - Could not find a valid gem 'redis' (>= 0) locally or in a repository ERROR: Could not find a valid gem 'redis' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz) Exception Errno::EEXIST' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/fileutils.rb:250 - File exists @ dir_s_mkdir - /Users/jagger/.gem/specs/api.rubygems.org%443 ExceptionErrno::ENOENT' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:294 - No such file or directory @ rb_file_s_stat - /Users/jagger/.gem/specs/api.rubygems.org%443/prerelease_specs.4.8 Exception IO::EAGAINWaitReadable' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/openssl/buffering.rb:182 - Resource temporarily unavailable - read would block ExceptionOpenSSL::SSL::SSLError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/net/http.rb:920 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Exception OpenSSL::SSL::SSLError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/net/http.rb:928 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ExceptionGem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/request.rb:101 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/prerelease_specs.4.8.gz) Exception Gem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:278 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/prerelease_specs.4.8.gz) ExceptionErrno::EEXIST' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/fileutils.rb:250 - File exists @ dir_s_mkdir - /Users/jagger/.gem/specs/api.rubygems.org%443 Exception IO::EAGAINWaitReadable' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/openssl/buffering.rb:182 - Resource temporarily unavailable - read would block ExceptionOpenSSL::SSL::SSLError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/net/http.rb:920 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Exception OpenSSL::SSL::SSLError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/net/http.rb:928 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ExceptionGem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/request.rb:101 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) Exception Gem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:278 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) ExceptionGem::RemoteFetcher::FetchError' at /usr/local/Cellar/ruby/2.1.1_1/lib/ruby/2.1.0/rubygems/spec_fetcher.rb:268 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

raggi commented 10 years ago

Rubygems uses it's own certs: https://github.com/rubygems/rubygems/tree/master/lib/rubygems/ssl_certs so your proxy providing fake certs will not validate. This is all totally unrelated to this program.