summaryrefslogtreecommitdiffhomepage
path: root/auto/lib (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-05-23QUIC: using QUIC API introduced in OpenSSL 3.5.Sergey Kandaurov1-2/+8
Similarly to the QUIC API originated in BoringSSL, this API allows to register custom TLS callbacks for an external QUIC implementation. See the SSL_set_quic_tls_cbs manual page for details. Due to a different approach used in OpenSSL 3.5, handling of CRYPTO frames was streamlined to always write an incoming CRYPTO buffer to the crypto context. Using SSL_provide_quic_data(), this results in transient allocation of chain links and buffers for CRYPTO frames received in order. Testing didn't reveal performance degradation of QUIC handshakes, https://github.com/nginx/nginx/pull/646 provides specific results.
2025-05-23QUIC: defined SSL API macros in a single place.Sergey Kandaurov1-3/+0
All definitions now set in ngx_event_quic.h, this includes moving NGX_QUIC_OPENSSL_COMPAT from autotests to compile time. Further, to improve code readability, a new NGX_QUIC_QUICTLS_API macro is used for QuicTLS that provides old BoringSSL QUIC API.
2025-04-18Win32: added detection of ARM64 target.Aleksei Bavshin1-0/+4
This extends the target selection implemented in dad6ec3aa63f to support Windows ARM64 platforms. OpenSSL support for VC-WIN64-ARM target first appeared in 1.1.1 and is present in all currently supported (3.x) branches. As a side effect, ARM64 Windows builds will get 16-byte alignment along with the rest of non-x86 platforms. This is safe, as malloc on 64-bit Windows guarantees the fundamental alignment of allocations, 16 bytes.
2025-02-18Configure: MSVC compatibility with PCRE2 10.45.Thierry Bastian1-0/+1
2025-01-30Configure: fixed --with-libatomic=DIR with recent libatomic_ops.Sergey Kandaurov2-5/+10
The build location of the resulting libatomic_ops.a was changed in v7.4.0 after converting libatomic_ops to use libtool. The fix is to use library from the install path, this allows building with both old and new versions. Initially reported here: https://mailman.nginx.org/pipermail/nginx/2018-April/056054.html
2024-10-15Configure: MSVC compatibility with PCRE2 10.43.Thierry Bastian1-1/+2
2024-05-16Configure: fixed building libatomic test.Edgar Bonet1-1/+1
Using "long *" instead of "AO_t *" leads either to -Wincompatible-pointer-types or -Wpointer-sign warnings, depending on whether long and size_t are compatible types (e.g., ILP32 versus LP64 data models). Notably, -Wpointer-sign warnings are enabled by default in Clang only, and -Wincompatible-pointer-types is an error starting from GCC 14. Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
2024-02-26Configure: added support for Homebrew on Apple Silicon.Piotr Sikora5-0/+84
Signed-off-by: Piotr Sikora <piotr@aviatrix.com>
2023-06-21SSL: avoid using OpenSSL config in build directory (ticket #2404).Maxim Dounin1-0/+2
With this change, the NGX_OPENSSL_NO_CONFIG macro is defined when nginx is asked to build OpenSSL itself. And with this macro automatic loading of OpenSSL configuration (from the build directory) is prevented unless the OPENSSL_CONF environment variable is explicitly set. Note that not loading configuration is broken in OpenSSL 1.1.1 and 1.1.1a (fixed in OpenSSL 1.1.1b, see https://github.com/openssl/openssl/issues/7350). If nginx is used to compile these OpenSSL versions, configuring nginx with NGX_OPENSSL_NO_CONFIG explicitly set to 0 might be used as a workaround.
2023-03-29Merged with the default branch.Sergey Kandaurov2-2/+15
2023-02-23Win32: OpenSSL compilation for x64 targets with MSVC.Maxim Dounin2-2/+15
To ensure proper target selection the NGX_MACHINE variable is now set based on the MSVC compiler output, and the OpenSSL target is set based on it. This is not important as long as "no-asm" is used (as in misc/GNUmakefile and win32 build instructions), but might be beneficial if someone is trying to build OpenSSL with assembler code.
2023-02-22QUIC: OpenSSL compatibility layer.Roman Arutyunyan1-24/+30
The change allows to compile QUIC with OpenSSL which lacks BoringSSL QUIC API. This implementation does not support 0-RTT.
2022-09-07Win32: disabled threads support in OpenSSL builds.Maxim Dounin1-1/+1
Threads are disabled during UNIX builds (see b329c0ab1a48), and also not needed for Windows builds. This used to be the default before OpenSSL 1.1.0.
2022-10-20Merged with the default branch.Sergey Kandaurov1-1/+1
2021-12-29Merged with the default branch.Sergey Kandaurov2-93/+213
2021-12-25PCRE2 library support.Maxim Dounin2-41/+218
The PCRE2 library is now used by default if found, instead of the original PCRE library. If needed for some reason, this can be disabled with the --without-pcre2 configure option. To make it possible to specify paths to the library and include files via --with-cc-opt / --with-ld-opt, the library is first tested without any additional paths and options. If this fails, the pcre2-config script is used. Similarly to the original PCRE library, it is now possible to build PCRE2 from sources with nginx configure, by using the --with-pcre= option. It automatically detects if PCRE or PCRE2 sources are provided. Note that compiling PCRE2 10.33 and later requires inttypes.h. When compiling on Windows with MSVC, inttypes.h is only available starting with MSVC 2013. In older versions some replacement needs to be provided ("echo '#include <stdint.h>' > pcre2-10.xx/src/inttypes.h" is good enough for MSVC 2010). The interface on nginx side remains unchanged.
2021-12-25Configure: simplified PCRE compilation.Maxim Dounin1-65/+8
Removed ICC-specific PCRE optimizations which tried to link with PCRE object files instead of the library. Made compiler-specific code minimal.
2021-09-27Configure: fixed QUIC support test.Ruslan Ermilov1-23/+22
OpenSSL library QUIC support cannot be tested at configure time when using the --with-openssl option so assume it's present if requested. While here, fixed the error message in case QUIC support is missing.
2021-09-27Configure: check for QUIC 0-RTT support at compile time.Ruslan Ermilov1-9/+0
2021-09-21Configure: simplified condition.Ruslan Ermilov1-3/+0
2021-09-14Removed NGX_OPENSSL_QUIC macro, NGX_QUIC is enough.Ruslan Ermilov1-3/+1
2021-09-09Changed the OpenSSL QUIC support detection.Ruslan Ermilov1-1/+1
As was changed in 253cf267f95a.
2020-07-21QUIC: added "quic" listen parameter.Roman Arutyunyan1-0/+1
The parameter allows processing HTTP/0.9-2 over QUIC. Also, introduced ngx_http_quic_module and moved QUIC settings there
2020-06-01Compatibility with BoringSSL master branch.Sergey Kandaurov1-0/+12
Recently BoringSSL introduced SSL_set_quic_early_data_context() that serves as an additional constrain to enable 0-RTT in QUIC. Relevant changes: * https://boringssl.googlesource.com/boringssl/+/7c52299%5E!/ * https://boringssl.googlesource.com/boringssl/+/8519432%5E!/
2020-05-01Configure: fixed static compilation with OpenSSL 1.1.1 / BoringSSL.Sergey Kandaurov1-1/+1
See 7246:04ebf29eaf5b for details.
2020-04-30Configure: unbreak with old OpenSSL, --with-http_v3_module added.Sergey Kandaurov1-8/+26
2020-02-28HTTP UDP layer, QUIC support autotest.Sergey Kandaurov1-0/+9
2018-07-24Configure: fixed compiler warnings with "-Wall -Wextra".Sergey Kandaurov3-5/+8
2018-03-22Configure: restored "no-threads" in OpenSSL builds.Maxim Dounin1-1/+1
This was previously used, but was incorrectly removed in 83d54192e97b while removing old threads remnants. Instead of using it conditionally when threads are not used, we now set in unconditionally, as even with thread pools enabled we never call OpenSSL functions in threads. This fixes resulting binary when using --with-openssl with OpenSSL 1.1.0+ and without -lpthread linked (notably on FreeBSD without PCRE).
2018-03-22Configure: fixed static compilation with OpenSSL 1.1.1.Maxim Dounin1-7/+14
OpenSSL now uses pthread_atfork(), and this requires -lpthread on Linux to compile. Introduced NGX_LIBPTHREAD to add it as appropriate, similar to existing NGX_LIBDL.
2017-07-19Configure: fixed PCRE requirement check by ngx_http_rewrite_module.Samuel Martin1-1/+1
The http_rewrite module cannot be selected when http is disabled. Fixed the PCRE check condition to avoid irrelevant check failure. This is a regression from 4d874b4d82ed. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
2016-12-24Win32: compatiblity with OpenSSL 1.1.0.Maxim Dounin2-7/+22
OpenSSL 1.1.0 now uses normal "nmake; nmake install" instead of using custom "ms\do_ms.bat" script and "ms\nt.mak" makefile. And Configure now requires --prefix to be absolute, and no longer derives --openssldir from prefix (so it's specified explicitly). Generated libraries are now called "libcrypto.lib" and "libssl.lib" instead of "libeay32.lib" and "ssleay32.lib". Appropriate tests added to support both old and new variants. Additionally, openssl/lhash.h now triggers warning C4090 ('function' : different 'const' qualifiers), so the warning was disabled.
2016-12-16Configure: detect nginx version for nginx.pm at make time.Ruslan Ermilov1-4/+5
2016-12-07Perl: removed special environment handling for the perl module.Maxim Dounin1-3/+3
In Perl 5.8.6 the default was switched to use putenv() when used as embedded library unless "PL_use_safe_putenv = 0" is explicitly used in the code. Therefore, for modern versions of Perl it is no longer necessary to restore previous environment when calling perl_destruct().
2016-10-21Image filter: support for WebP.Valentin Bartenev1-0/+5
In collaboration with Ivan Poluyanov.
2016-10-04Configure: removed the --with-ipv6 option.Maxim Dounin1-11/+9
IPv6 now compiled-in automatically if support is found. If there is a need to disable it for some reason, --with-cc-opt="-DNGX_HAVE_INET6=0" can be used for this.
2016-09-20Perl: pass additional linker options to perl module.Konstantin Pavlov2-1/+4
Previously flags passed by --with-ld-opt were not used when building perl module, which meant hardening flags provided by package build systems were not applied.
2015-10-23Configure: remove auto/lib/test, unused since nginx-0.1.2.Piotr Sikora1-40/+0
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-06-30Internal md5 and sha1 implementations are now always used.Maxim Dounin12-521/+0
This reduces the number of moving parts in ABI compatibility checks. Additionally, it also allows to use OpenSSL in FIPS mode while still using md5 for non-security tasks.
2016-03-31SSL: initialization changes for OpenSSL 1.1.0.Maxim Dounin1-1/+1
OPENSSL_config() deprecated in OpenSSL 1.1.0. Additionally, SSL_library_init(), SSL_load_error_strings() and OpenSSL_add_all_algorithms() are no longer available if OPENSSL_API_COMPAT is set to 0x10100000L. The OPENSSL_init_ssl() function is now used instead with appropriate arguments to trigger the same behaviour. The configure test changed to use SSL_CTX_set_options(). Deinitialization now happens automatically in OPENSSL_cleanup() called via atexit(3), so we no longer call EVP_cleanup() and ENGINE_cleanup() directly.
2016-02-26Dynamic modules: perl.Ruslan Ermilov4-5/+11
2016-02-19Configure: skip building OpenSSL documentation to conserve time.Sergey Kandaurov1-1/+1
The install_sw target first appeared in OpenSSL 0.9.7e and is documented since OpenSSL 1.0.0 as the way to install the OpenSSL software without documentation.
2016-02-18Configure: fixed static nginx build with OpenSSL (ticket #903).Ruslan Ermilov1-7/+8
Before 7142b04337d6, it was possible to build the OpenSSL library along with nginx, and link nginx statically with this library (--with-openssl=DIR --with-ld-opt=-static --with-http_ssl_module). This was broken on Linux by not adding -ldl after -lcrypto. The fix also makes it possible to link nginx statically on Linux with the system OpenSSL library, which never worked before.
2016-02-13Win32: simplified and improved handling of MSVC versions.Maxim Dounin8-16/+16
Now we always set NGX_CC_NAME to "msvc", and additionally test compiler version as reported by "cl" in auto/cc/msvc (the same version is also available via the _MSC_VER define). In particular, this approach allows to properly check for C99 variadic macros support, which previously was not used with MSVC versions not explicitly recognized. Now unneeded wildcards in NGX_CC_NAME tests for msvc removed accordingly, as well as unused wildcards for owc and icc.
2016-02-04Dynamic modules.Maxim Dounin4-7/+26
The auto/module script is extended to understand ngx_module_link=DYNAMIC. When set, it links the module as a shared object rather than statically into nginx binary. The module can later be loaded using the "load_module" directive. New auto/module parameter ngx_module_order allows to define module loading order in complex cases. By default the order is set based on ngx_module_type. 3rd party modules can be compiled dynamically using the --add-dynamic-module configure option, which will preset ngx_module_link to "DYNAMIC" before calling the module config script. Win32 support is rudimentary, and only works when using MinGW gcc (which is able to handle exports/imports automatically). In collaboration with Ruslan Ermilov.
2016-02-04Dynamic modules: dlopen() support.Maxim Dounin1-2/+1
2015-11-30Configure: improved workaround for system perl on OS X.Ruslan Ermilov1-1/+1
The workaround from baf2816d556d stopped to work because the order of "-arch x86_64" and "-arch i386" has changed.
2015-11-23Configure: fixed using OpenSSL include paths.Maxim Dounin1-0/+1
2015-06-10Configure: search OpenSSL in a bunch of standard places.Ruslan Ermilov1-0/+48
2015-03-13Configure: removed obsolete threads bits.Ruslan Ermilov1-5/+0