Closed kaomte closed 2 months ago
I'm getting the same here.
@kaomte It's not security advised but if you're desperate about it you can patch this gem to ignore SSL verifications by adding a file like this in your project:
module Itunes
class Receipt
def self.post_to_endpoint(request_data, endpoint = Itunes.endpoint)
response = RestClient::Request.execute(
method: :post,
url: endpoint,
payload: request_data.to_json,
verify_ssl: OpenSSL::SSL::VERIFY_NONE
)
JSON.parse(response).with_indifferent_access
end
end
end
If you use Rails it would be ~lib/itunes/receipt.rb
~ within some initializer. [EDITED]
But we should wait for a better either anyway.
Adding more information, it looks like the actual issue is https://github.com/nov/restclient_with_cert/issues/1
I've been getting these errors in production. I've fixed the issue on a custom branch of mine by swapping out RestClient for Faraday.
I, [2018-03-01T15:53:16.455400 #19005] INFO -- : Celluloid 0.17.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ] Loading development environment (Rails 4.2.5) irb(main):001:0> require 'itunes' => false irb(main):002:0> Itunes::Receipt.verify!({}) RestClient::SSLCertificateNotVerified: SSL_connect returned=1 errno=0 state=error: certificate verify failed: from /Users/kaom/.rbenv/versions/2.1.10/lib/ruby/gems/2.1.0/gems/rest-client-1.8.0/lib/restclient/request.rb:445:in
rescue in transmit'`