diff --git a/lib/private_pub.rb b/lib/private_pub.rb index a595cf8..8287b54 100644 --- a/lib/private_pub.rb +++ b/lib/private_pub.rb @@ -38,8 +38,11 @@ def publish_message(message) form.set_form_data(:message => message.to_json) http = Net::HTTP.new(url.host, url.port) - http.use_ssl = url.scheme == "https" - http.start {|h| h.request(form)} + if url.scheme == "https" + http.use_ssl = true + http.verify_mode = OpenSSL::SSL::VERIFY_NONE if config[:ssl_verify_mode] == true + end + http.start {|h| h.request(form)} end # Returns a message hash for sending to Faye