Skip to content

Commit

Permalink
Disable SSL verify mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofurtado committed Jun 3, 2022
1 parent a4ea373 commit 462a1aa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
erede (3.0.0)
erede-ruby-sdk (3.0.2)
bundler
json

Expand Down Expand Up @@ -29,7 +29,7 @@ PLATFORMS
x86_64-linux-musl

DEPENDENCIES
erede!
erede-ruby-sdk!
rake
rspec

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion lib/erede/services/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
2 changes: 1 addition & 1 deletion lib/erede/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Erede
VERSION = '3.0.1'
VERSION = '3.0.2'
end
1 change: 1 addition & 0 deletions spec/models/store_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 462a1aa

Please sign in to comment.