29 Commits
Author SHA1 Message Date
Sergey Kandaurov 6cfa1c3970 Using SSL_OP_IGNORE_UNEXPECTED_EOF.
A new behaviour was introduced in OpenSSL 1.1.1e, when a peer does not send
close_notify before closing the connection.  Previously, it was to return
SSL_ERROR_SYSCALL with errno 0, known since at least OpenSSL 0.9.7, and is
handled gracefully in unitd.  Now it returns SSL_ERROR_SSL with a distinct
reason SSL_R_UNEXPECTED_EOF_WHILE_READING ("unexpected eof while reading").
This leads to critical errors seen in nginx within various routines such as
SSL_do_handshake(), SSL_read(), SSL_shutdown().  The behaviour was restored
in OpenSSL 1.1.1f, but presents in OpenSSL 3.0 by default.

Use of the SSL_OP_IGNORE_UNEXPECTED_EOF option added in OpenSSL 3.0 allows
setting a compatible behaviour to return SSL_ERROR_ZERO_RETURN:
https://git.openssl.org/?p=openssl.git;a=commitdiff;h=09b90e0

See for additional details: https://github.com/openssl/openssl/issues/11381
2022-05-12 12:04:54 +04:00
Sergey Kandaurov 5665838b68 Using OPENSSL_SUPPRESS_DEPRECATED.
The macro is used to suppress deprecation warnings with OpenSSL 3.0.

Unlike OPENSSL_API_COMPAT, it works well with OpenSSL built with no-deprecated.
In particular, it doesn't unhide various macros in OpenSSL includes, which are
meant to be hidden under OPENSSL_NO_DEPRECATED.
2022-05-12 12:04:47 +04:00
Sergey Kandaurov 94a9162baa Configure: fixed posix_spawn() detection with glic 2.30.
In particular, it was previously broken on Ubuntu 19.10 and Fedora 31.
See for details: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2ab5741
2019-11-22 14:06:02 +03:00
Sergey Kandaurov 217914df7c Version bump. 2019-11-22 16:39:15 +03:00
Sergey Kandaurov c416933171 PHP: zeroing the whole file_handle structure.
Fixes segfaults with PHP 7.4.
2019-09-23 11:56:31 +00:00
Sergey Kandaurov 3280b826e3 Initializing incoming buffer queue in a proper place.
In case nxt_unit_tracking_read() failed, execution would jump to the error path,
where it could try to release buffers from uninitialized yet incoming_buf queue.
2019-02-21 16:30:59 +03:00
Sergey Kandaurov 0fdc7c3a55 Tests: Node.js application tests. 2018-10-25 15:43:48 +03:00
Sergey Kandaurov 7a06fab9e3 Mention of "nodejs" configure option in help. 2018-11-01 17:02:46 +03:00
Sergey Kandaurov 161e1839a5 Compatibility with LibreSSL.
LibreSSL uses high OPENSSL_VERSION_NUMBER, but has no SSL_CTX_add0_chain_cert().
2018-10-22 16:16:05 +03:00
Sergey Kandaurov 3061e8333d Tests: provide openssl.conf in test_tls_certificate_key_ec.
Previously, test failed if openssl was unable to load config info,
or the system's openssl.cnf was picked up, which is wrong as well.
2018-10-18 18:46:21 +03:00
Sergey Kandaurov e4650b7412 Fixed building perl on Alpine Linux.
_GNU_SOURCE is required there to expose off64_t and other types.
2018-09-20 16:34:19 +03:00
Sergey Kandaurov 7c5a710c55 Added getentropy() support.
Prodded by David Carlier.
2018-07-16 13:30:11 +03:00
Sergey Kandaurov bf1cb8f399 Supplied getrandom() test with commentary about supported OSes. 2018-07-16 13:17:49 +03:00
Sergey Kandaurov 14bc401394 Using own popcount where the compiler builtin is not available. 2018-06-20 19:34:06 +03:00
Sergey Kandaurov 50d4587961 Using portable grep features. 2018-06-20 19:33:49 +03:00
Sergey Kandaurov 3befb08204 Fixed a dead store.
Found by Clang Static Analyzer.
2018-05-25 16:18:34 +03:00
Sergey Kandaurov a9ea218e7e Using getrandom() libc interface, SYS_getrandom fixes.
The interface is available since Glibc 2.25, and FreeBSD 12.0.
2018-05-24 20:35:47 +03:00
Sergey Kandaurov 7f79f2f105 Enabled exporting symbols for OpenBSD. 2018-04-15 19:44:38 +03:00
Sergey Kandaurov 4f712e3fd0 Added support for shm_open(SHM_ANON) extension. 2018-03-06 13:55:51 +00:00
Sergey Kandaurov 771e9d3cc3 Fixed formatting in nxt_sprintf() and logging. 2018-01-24 15:16:33 +03:00
Sergey Kandaurov 67c64a99fb Using size_t for the field width type of the "%*s" specifier. 2018-01-24 15:16:32 +03:00
Sergey Kandaurov cdfdbc43eb Enabled exporting symbols for NetBSD. 2017-12-26 17:55:48 +03:00
Sergey Kandaurov 752038eea8 Fixed building with pthread_t defined as a pointer. 2017-09-27 18:34:24 +03:00
Sergey Kandaurov 9213299d1f Supported linking with -lrt on BSD systems.
OpenBSD lacks support of librt.
2017-09-27 18:34:23 +03:00
Sergey Kandaurov aac0f06f3d Better checking for shm_open() during configure. 2017-09-27 18:34:23 +03:00
Sergey Kandaurov d57ec94a3f Initialized task in utf8 unit test, fixes segfault in debug build. 2017-09-04 17:32:29 +03:00
Sergey Kandaurov db85a9a015 Go: fixed splitting recipe line with newer gmake.
Use double quotes to quote a string with the backslash/newline pair.
Newer gmake versions, such as GNU Make 4.1, do not remove the backslash
from a string quoted with single quotes, which results in an extraneous
backslash passed to the shell and, eventually, to the Go compiler.
2017-08-31 18:21:22 +03:00
Sergey Kandaurov f27ed60a09 PHP SAPI: typo fixed. 2017-08-31 15:16:18 +03:00
Sergey Kandaurov 5118a0a89d Fixed typedef nxt_port_mmap_msg_t redefinition after 1b394e999c7c.
Redefinition of typedef is a C11 feature.  On older compilers that
default to C99, such as clang 3.4.1 supplied with FreeBSD 10, this
caused -Wtypedef-redefinition warnings.
2017-08-25 17:11:29 +03:00