Skip to content

Commit

Permalink
feat: allow SSL verification to be disabled by setting the environmen…
Browse files Browse the repository at this point in the history
…t variable PACT_DISABLE_SSL_VERIFICATION=true
  • Loading branch information
bethesque committed Jan 29, 2020
1 parent 39cfd8a commit 8375dc8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/pact
Expand Up @@ -6,4 +6,10 @@ if argv.first == "help" && argv.size > 1
argv.shift
end

if 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

Pact::AggregatedCLI.start([argv.first])

0 comments on commit 8375dc8

Please sign in to comment.