From 462a1aab508ef850afb8b18a4c69c02c7e154469 Mon Sep 17 00:00:00 2001 From: Pedro Furtado Date: Thu, 2 Jun 2022 22:23:30 -0300 Subject: [PATCH] Disable SSL verify mode --- Gemfile.lock | 4 ++-- README.md | 3 +++ lib/erede/services/base.rb | 5 ++++- lib/erede/version.rb | 2 +- spec/models/store_spec.rb | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ccf5e98..2e22dd8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - erede (3.0.0) + erede-ruby-sdk (3.0.2) bundler json @@ -29,7 +29,7 @@ PLATFORMS x86_64-linux-musl DEPENDENCIES - erede! + erede-ruby-sdk! rake rspec diff --git a/README.md b/README.md index 7fd9822..fab0d38 100644 --- a/README.md +++ b/README.md @@ -107,4 +107,7 @@ docker run --rm -v $(pwd):/app/ -w /app/ -it erede_ruby irb -I lib -r erede - https://developer.userede.com.br/dev-portal-swaggers/erede/swagger.json - https://developer.userede.com.br/files/erede/integration_manual.pdf - https://developer.userede.com.br/e-rede +- https://www.userede.com.br/novo/documentos/certificado-digital-rede/certificado-digital-atualizar +- https://www.userede.com.br/novo/documentos/certificado-digital-rede +- https://www.userede.com.br/content/dam/userede/website/documents/certificado-digital/Ecommerce_B64.zip - https://github.com/DevelopersRede diff --git a/lib/erede/services/base.rb b/lib/erede/services/base.rb index 6434467..b26176e 100644 --- a/lib/erede/services/base.rb +++ b/lib/erede/services/base.rb @@ -25,7 +25,10 @@ def send_request(method, body = '') query_string = uri && uri.query && !uri.query.nil? && !uri.query.empty? ? "?#{uri.query}" : '' response = Net::HTTP.new(uri.host, uri.port) - .tap { |net_http| net_http.use_ssl = uri.scheme == 'https' } + .tap do |net_http| + net_http.use_ssl = uri.scheme == 'https' + net_http.verify_mode = 0 #=> OpenSSL::SSL::VERIFY_NONE + end .request( method.new(uri.path + query_string, { 'Content-Type': 'application/json', 'Transaction-Response': 'brand-return-opened' }) .tap do |request| diff --git a/lib/erede/version.rb b/lib/erede/version.rb index 4648b06..d22051b 100644 --- a/lib/erede/version.rb +++ b/lib/erede/version.rb @@ -1,3 +1,3 @@ module Erede - VERSION = '3.0.1' + VERSION = '3.0.2' end diff --git a/spec/models/store_spec.rb b/spec/models/store_spec.rb index 0fce3e9..4fb3726 100644 --- a/spec/models/store_spec.rb +++ b/spec/models/store_spec.rb @@ -8,6 +8,7 @@ expect(subject).to respond_to :token expect(subject).to respond_to :filiation expect(subject).to respond_to :environment + expect(subject).to respond_to :logger end end end