Skip to content

Commit

Permalink
feat: allow SSL verification to be disabled
Browse files Browse the repository at this point in the history
I give up.
  • Loading branch information
bethesque committed Mar 31, 2021
1 parent a7343f8 commit eb2125b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/pact-broker
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/usr/bin/env ruby
require 'pact_broker/client/cli/broker'

if ENV['PACT_BROKER_DISABLE_SSL_VERIFICATION'] == 'true' || ENV['PACT_DISABLE_SSL_VERIFICATION'] == 'true'
require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
$stderr.puts "WARN: SSL verification has been disabled by a dodgy hack (reassigning the VERIFY_PEER constant to VERIFY_NONE). You acknowledge that you do this at your own risk!"
end

PactBroker::Client::CLI::Broker.start

0 comments on commit eb2125b

Please sign in to comment.