Skip to content

Commit e6ec22c

Browse files
committed
Don't require SSL_OP_IGNORE_UNEXPECTED_EOF.
1 parent 34cbef7 commit e6ec22c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/plugins/input/tcp/src/tls/DecoderFactory.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
#include "TlsDecoder.hpp"
1414

15+
// OpenSSL v1.1.1 compatibility
16+
#ifndef SSL_OP_IGNORE_UNEXPECTED_EOF
17+
#define SSL_OP_IGNORE_UNEXPECTED_EOF 0
18+
#endif // ifndef SSL_OP_IGNORE_UNEXPECTED_EOF
19+
1520
namespace tcp_in {
1621
namespace tls {
1722

src/plugins/input/tcp/src/tls/Ssl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ ReadResult Ssl::read_ex(std::uint8_t *data, std::size_t &length) {
3636
auto err = SSL_get_error(get(), ret);
3737
length = 0;
3838
switch (err) {
39+
case SSL_ERROR_SSL:
40+
// The TLS connection is broken.
3941
case SSL_ERROR_ZERO_RETURN:
4042
// Don't bother properly closing the connection. We only care about the received
4143
// data but there will be no more data. Peer will handle this.

0 commit comments

Comments
 (0)