Search code examples
ruby-on-railssslpaypalactivemerchantpoodle-attack

ActiveMerchant Poodle patch for PayPal


I'm using Rails 3, ActiveMerchant 1.5.1 gem, and PayPal express. Since recently I can't get my payments work through PayPal, continue to receive this error

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

I believe this is related to PayPal response to Poodle. Is there any patch for ActiveMerchant to address these PayPal changes or the SSL 3.0 Vulnerability in general?


Solution

  • Thanks to Eshan I found that Net::Http can be forced to use specific protocol during connection. That's how I patched my version of ActiveMerchant

    def configure_ssl(http)
      ...
    
      http.use_ssl = true
    
      http.ssl_version = :TLSv1  # poodle vulnarability fix
    
      ...
    end
    

    For those who have a newer version of ActiveMerchant, I think upgrading to the master, as suggested by Davidslv, should work.