Skip to content

Commit

Permalink
verify_hostname should be set false when it donsn't need
Browse files Browse the repository at this point in the history
to suppress the warning.

```
warning: verify_hostname requires hostname to be set
```

Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed Apr 6, 2020
1 parent cbf3d11 commit f7e45c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin_helper/socket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def socket_create_tls(
context.ciphers = ciphers
context.verify_mode = OpenSSL::SSL::VERIFY_PEER
context.cert_store = cert_store
context.verify_hostname = true if verify_fqdn && fqdn
context.verify_hostname = verify_fqdn && fqdn
context.key = OpenSSL::PKey::read(File.read(private_key_path), private_key_passphrase) if private_key_path

if cert_path
Expand Down

0 comments on commit f7e45c6

Please sign in to comment.