SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Certificate Verification Failed

    Hi,

    As I posted in another thread, I'm creating a script to communicate with the Amazon Mechanical Turk API. I finally figured out the error I was having, but now am having an SSL problem in the Ruby SDK.

    All I have is this, to test it:

    Code:
    #!/usr/bin/env ruby
    
    require 'rubygems'
    require 'ruby-aws'
    
    @mturk = Amazon::WebServices::MechanicalTurkRequester.new :Host => :Production, :SSL => false
    puts "I have $#{@mturk.availableBalance}"
    I get this error:

    Code:
    fatal: Not a git repository (or any of the parent directories): .git
    /usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:586:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
    	from /usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:586:in `connect'
    	from /usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:553:in `do_start'
    	from /usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/net/http.rb:542:in `start'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/util/rest_transport.rb:74:in `method_missing'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/util/amazon_authentication_relay.rb:41:in `send'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/util/amazon_authentication_relay.rb:41:in `method_missing'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/mturk/mechanical_turk_error_handler.rb:44:in `send'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/mturk/mechanical_turk_error_handler.rb:44:in `dispatch'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/mechanical_turk.rb:65:in `method_missing'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/util/convenience_wrapper.rb:22:in `send'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/util/convenience_wrapper.rb:22:in `callService'
    	from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/ruby-aws-1.3.1/lib/amazon/webservices/util/convenience_wrapper.rb:29:in `method_missing'
    	from ./aws.rb:7
    As you see, it says "certificate verify failed."

    Does anyone know if there is any way to have it not use SSL, or have the verification go through successfully?

    Also, why does it say "not a git repository"? It says that every time I call this script.

    Any help would be much appreciated.

  2. #2
    secure webapps for all Aleksejs's Avatar
    Join Date
    Apr 2008
    Location
    Riga, Latvia
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi!
    I do not know much about ruby.
    But it seems that it might be because you do not have the root certificate (and possibly intermediate certificates) that this Amazon certificate is signed with, in your trusted keystore.

  3. #3
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)
    It appears you problem is related to loading of a Ruby Gem.
    Probably the 'rubygems' you have referenced in your code.
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  4. #4
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ParkinT View Post
    It appears you problem is related to loading of a Ruby Gem.
    Probably the 'rubygems' you have referenced in your code.
    Can you be more clear? Why would requiring 'rubygems' be the problem? That's a necessary step for including 'ruby-aws'

  5. #5
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,343
    Mentioned
    192 Post(s)
    Tagged
    4 Thread(s)
    The failure is in a call to RVM.
    Proper troubleshooting should direct your attention to the originial error message: fatal: Not a git repository (or any of the parent directories): .git
    See that it refers to a git repository which, I suspect, is one of the gems RVM is attempting to pull down for you.
    I was hoping someone with a bit more experience in RoR would pick up on this thread and offer some input.

    [What part of Pennsylvania are you?]
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •