Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save germanramos/8594368 to your computer and use it in GitHub Desktop.
Save germanramos/8594368 to your computer and use it in GitHub Desktop.
Bug SSL vagrant-google in MAC OSX. And Workaround
Error:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Motivo:
Fallo en la lectura de autoridades de certificación
Work around:
Fichero: /Applications/Vagrant/embedded/lib/ruby/1.9.1/net/http.rb
Añadir en la linea 779 aprox:
SSL_ATTRIBUTES.each do |name|
ivname = "@#{name}".intern
if iv_list.include?(ivname) and
value = instance_variable_get(ivname)
ssl_parameters[name] = value
end
end
# WORK AROUND FOR MAC OS SSL VERIFICATION ERROR:
ssl_parameters["verify_mode"] = 0
# $stderr.puts ssl_parameters["verify_mode"]
# END WORK AROUND
@ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.set_params(ssl_parameters)
s = OpenSSL::SSL::SSLSocket.new(s, @ssl_context)
s.sync_close = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment