Skip to content

Commit c2d8ee4

Browse files
authored
Added support for TLS SNI (#66)
Added support for TLS SNI , assign host value to the socket hostname. Signed-off-by: Tero Saarni <[email protected]>
1 parent 27bacbe commit c2d8ee4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 3.0.6
22
- Change codec instance comparison [#69](https://github.com/logstash-plugins/logstash-output-syslog/pull/69)
33
- Added support for RFC5424 structured data [#67](https://github.com/logstash-plugins/logstash-output-syslog/pull/67)
4+
- 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)
45

56
## 3.0.5
67
- Docs: Set the default_codec doc attribute.

lib/logstash/outputs/syslog.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ def connect
218218
socket = TCPSocket.new(@host, @port)
219219
if ssl?
220220
socket = OpenSSL::SSL::SSLSocket.new(socket, @ssl_context)
221+
# Use SNI extension
222+
socket.hostname = @host
221223
begin
222224
socket.connect
223225
rescue OpenSSL::SSL::SSLError => ssle

0 commit comments

Comments
 (0)