Skip to content

Commit

Permalink
[#cobinhood] Remove SSL Verify None
Browse files Browse the repository at this point in the history
  • Loading branch information
tmlee committed Jan 25, 2018
1 parent 4020bbf commit a943f82
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
8 changes: 0 additions & 8 deletions lib/cryptoexchange/exchanges/cobinhood/services/market.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ def adapt(output, market_pair)
ticker.payload = market
ticker
end

private

def http_get(endpoint)
ctx = OpenSSL::SSL::SSLContext.new
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
fetch_response = HTTP.timeout(:write => 2, :connect => 5, :read => 8).get(endpoint, ssl_context: ctx)
end
end
end
end
Expand Down
9 changes: 0 additions & 9 deletions lib/cryptoexchange/exchanges/cobinhood/services/order_book.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@ def adapt_orders(orders)
timestamp: DateTime.now.to_time.to_i
end
end

private

def http_get(endpoint)
ctx = OpenSSL::SSL::SSLContext.new
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
fetch_response = HTTP.timeout(:write => 2, :connect => 5, :read => 8).get(endpoint, ssl_context: ctx)
end

end
end
end
Expand Down
7 changes: 0 additions & 7 deletions lib/cryptoexchange/exchanges/cobinhood/services/pairs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ module Services
class Pairs < Cryptoexchange::Services::Pairs
PAIRS_URL = "#{Cryptoexchange::Exchanges::Cobinhood::Market::API_URL}/market/trading_pairs"

def fetch_via_api(endpoint = self.class::PAIRS_URL)
ctx = OpenSSL::SSL::SSLContext.new
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
fetch_response = HTTP.timeout(:write => 2, :connect => 5, :read => 8).get(endpoint, ssl_context: ctx)
JSON.parse(fetch_response.to_s)
end

def fetch
output = super
adapt(output)
Expand Down

0 comments on commit a943f82

Please sign in to comment.