Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

#94 Have a configuration setting to turn off http.verify_mode #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/private_pub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down