Allow silencing of the message. master
authorPete Elmore <pete@debu.gs>
Thu, 16 Jan 2014 07:55:00 +0000 (23:55 -0800)
committerPete Elmore <pete@debu.gs>
Thu, 16 Jan 2014 08:00:57 +0000 (00:00 -0800)
lib/grackle/transport.rb

index c8761d4bbae59bea11c8e678c06c59526f1d628c..5a33a4265f4ff33d42d39fa9b031735e918c4702 100644 (file)
@@ -58,6 +58,7 @@ module Grackle
     
     class << self
       attr_accessor :ca_cert_file
+      attr_accessor :be_wildly_insecure
     end
     
     def req_class(method)
@@ -267,7 +268,7 @@ module Grackle
           # Turn off SSL verification which gets rid of warning in 1.8.x and 
           # an error in 1.9.x.
           conn.verify_mode = OpenSSL::SSL::VERIFY_NONE
-          unless @ssl_warning_shown
+          unless @ssl_warning_shown || self.class.be_wildly_insecure
             $stderr.puts <<-EOS
 Warning: SSL Verification is not being performed. While your communication is 
 being encrypted, the identity of the other party is not being confirmed nor the