Skip to content

Commit

Permalink
Added support for TLS SNI (#66)
Browse files Browse the repository at this point in the history
Added support for TLS SNI , assign host value to the socket hostname.

Signed-off-by: Tero Saarni <[email protected]>
  • Loading branch information
tsaarni authored Sep 8, 2023
1 parent 27bacbe commit c2d8ee4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 3.0.6
- Change codec instance comparison [#69](https://github.com/logstash-plugins/logstash-output-syslog/pull/69)
- Added support for RFC5424 structured data [#67](https://github.com/logstash-plugins/logstash-output-syslog/pull/67)
- The SNI (Server Name Indication) extension is now used when connecting to syslog server with TLS and `host` is set to FQDN (Fully Qualified Domain Name) [#66](https://github.com/logstash-plugins/logstash-output-syslog/pull/66)

## 3.0.5
- Docs: Set the default_codec doc attribute.
Expand Down
2 changes: 2 additions & 0 deletions lib/logstash/outputs/syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def connect
socket = TCPSocket.new(@host, @port)
if ssl?
socket = OpenSSL::SSL::SSLSocket.new(socket, @ssl_context)
# Use SNI extension
socket.hostname = @host
begin
socket.connect
rescue OpenSSL::SSL::SSLError => ssle
Expand Down

0 comments on commit c2d8ee4

Please sign in to comment.