Skip to content
Merged
Changes from 1 commit
Commits
File filter

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: 4 additions & 3 deletions lib/kafka/ssl_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ def self.build(ca_cert_file_path: nil, ca_cert: nil, client_cert: nil, client_ce
store.set_default_paths
end
ssl_context.cert_store = store
ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER
# Verify certificate hostname if supported (ruby >= 2.4.0)
ssl_context.verify_hostname = verify_hostname if ssl_context.respond_to?(:verify_hostname=)
end

ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER
# Verify certificate hostname if supported (ruby >= 2.4.0)
ssl_context.verify_hostname = verify_hostname if ssl_context.respond_to?(:verify_hostname=)

ssl_context
end
end
Expand Down