diff options
author | Sven Nierlein <sven@consol.de> | 2024-10-09 09:50:39 +0200 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.org> | 2024-10-10 15:54:28 +0200 |
commit | 3b960442485b965d853205bddeaa7f6a6b03253e (patch) | |
tree | 9479c52cce02ca7928fa43c0113d46e7d5e9a2b3 /plugins-root | |
parent | 114e504403d1e06eccac08e7b8d99e0614581515 (diff) | |
download | monitoring-plugins-3b960442485b965d853205bddeaa7f6a6b03253e.tar.gz |
fix check_curl: OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
using check_curl on a probably embedded device responding as 'Server: GoAhead-Webs'
%> check_curl -H ... -S -vvv
> GET / HTTP/1.1
Host: ...
User-Agent: check_curl/v2.4.0 (monitoring-plugins 2.4.0, libcurl/7.76.1 OpenSSL/3.0.7 zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh/0.10.4/openssl/zlib nghttp2/1.43.0)
Accept: */*
Connection: close
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
< HTTP/1.0 302 Redirect
< Server: GoAhead-Webs
< Date: Tue Mar 26 17:57:16 2019
< Cache-Control: no-cache, no-store, must-revalidate,private
< Pragma: no-cache
< Expires: 0
< Content-Type: text/html
< X-Frame-Options: sameorigin
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Location: https://...
<
* OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
* Closing connection 0
reading the discussion on https://github.com/openssl/openssl/discussions/22690 suggest to set the option SSL_OP_IGNORE_UNEXPECTED_EOF
which makes check_curl behave like check_http at this point.
Since this is a rather new flag, fencing it in ifdefs.
And since there can only be one ssl ctx function, we need to move both tasks into one function.
Diffstat (limited to 'plugins-root')
0 files changed, 0 insertions, 0 deletions