Log

Author Commit Date CI Message
Azat Khuzhin 72a4fe76 2022-11-12T18:59:41 ws-chat-server: fix session name initialization (using of uninitialized data)
Azat Khuzhin c8c730c8 2022-11-12T18:56:03 cmake: tiny cleanup
Azat Khuzhin 56d380b9 2022-11-12T18:45:13 ws: ignore case while comparing values of Upgrade/Connection headers Cc: @widgetii Fixes: #1373
Azat Khuzhin 8482e227 2022-11-12T18:44:44 ws-chat-server: avoid SIGSEGV in case of evws_new_session() failure
Azat Khuzhin dda05f45 2022-11-12T18:11:08 sample/ws-chat.html: allow to open it via file:// protocol
Azat Khuzhin 2dfad6c3 2022-11-12T18:06:09 Suppress -Wdangling-pointer in event_signal_closure() gcc 12 complains: [34/46] Building C object CMakeFiles/event_static.dir/event.c.o /src/le/libevent/event.c: In function ‘event_signal_closure’: /src/le/libevent/event.c:1384:32: warning: storing the address of local variable ‘ncalls’ in ‘*ev.ev_.ev_signal.ev_pncalls’ [-Wdangling-pointer=] 1384 | ev->ev_pncalls = &ncalls; | ~~~~~~~~~~~~~~~^~~~~~~~~ /src/le/libevent/event.c:1378:15: note: ‘ncalls’ declared here 1378 | short ncalls; | ^~~~~~ /src/le/libevent/event.c:1378:15: note: ‘ev’ declared here
Azat Khuzhin e1d7d3e4 2022-11-12T17:56:51 sha1: ignore -Wstringop-overread warning Fixes the following: [4/38] Building C object CMakeFiles/event_shared.dir/sha1.c.o In function ‘SHA1Update’, inlined from ‘SHA1Final’ at /src/le/libevent/sha1.c:274:5, inlined from ‘builtin_SHA1’ at /src/le/libevent/sha1.c:292:5: /src/le/libevent/sha1.c:228:13: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 7 [-Wstringop-overread] 228 | SHA1Transform(context->state, *(const unsigned char (*)[64])&data[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /src/le/libevent/sha1.c:228:13: note: referencing argument 2 of type ‘const unsigned char[64]’ /src/le/libevent/sha1.c: In function ‘builtin_SHA1’: /src/le/libevent/sha1.c:80:13: note: in a call to function ‘SHA1Transform’ 80 | static void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) { | ^~~~~~~~~~~~~
Azat Khuzhin 23a01aa2 2022-11-12T16:41:55 sha1: hide SHA1_CTX
OgreTransporter ef8f8caa 2022-11-04T23:52:01 Fix syntax error (#1369)
Michael Madsen ff99f67a 2022-11-04T01:59:17 fixed missing check for null after strdup in evutil_inet_pton_scope (#1366)
Leon George 3ec3b469 2022-10-23T13:47:23 ws: fix compile error on centos 7 - very old compiler (#1359) * http: fix typo * ws: fix comile error On CentOS: CC ws.lo ws.c: In function 'get_ws_frame': ws.c:244:3: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < payload_len; i++) { ^ ws.c:244:3: note: use option -std=c99 or -std=gnu99 to compile your code
Azat Khuzhin f04a70f0 2022-10-22T22:23:52 Fix data-race in ws code (#1360) @widgetii: " ================================================================= ==985==ERROR: AddressSanitizer: heap-use-after-free on address 0xb24323e5 at pc 0xb6a06f1c bp 0x9fffc694 sp 0x9fffc260 WRITE of size 2 at 0xb24323e5 thread T22 #0 0xb6a06f1b in __interceptor_memcpy.part.43 (/usr/lib/libasan.so.5+0x41f1b) 0xb24323e5 is located 229 bytes inside of 512-byte region [0xb2432300,0xb2432500) freed by thread T0 (app) here: #0 0xb6a849df in free (/usr/lib/libasan.so.5+0xbf9df) #1 0xb64b6e07 in evbuffer_drain (/usr/lib/libevent_core-2.2.so.1+0x9e07) previously allocated by thread T22 here: #0 0xb6a84d17 in __interceptor_malloc (/usr/lib/libasan.so.5+0xbfd17) #1 0xb64b3d1b (/usr/lib/libevent_core-2.2.so.1+0x6d1b) #2 0x61223 in onIceCandidateHandler /home/dima/git/app/src/webrtc/local.c:116 #3 0x19296f in onNewIceLocalCandidate /home/dima/git/webrtc-c/src/source/PeerConnection/PeerConnection.c:471 " * upstream/pr/1360: Remove bad copy-paste Add locks for server WS, fixes #1357
Dmitry Ilyin e8f5a61d 2022-10-12T22:15:21 Remove bad copy-paste
Dmitry Ilyin c2ecb4ac 2022-10-12T14:13:44 Add locks for server WS, fixes #1357
Ryan Pavlik 8f47d8de 2022-10-03T09:31:10 cmake: Fix Android build. Android/Bionic C library needs no special flags to have threading support. Found when trying to build with vcpkg.
Azat Khuzhin 285fc7cc 2022-10-08T19:26:24 Use heap-bases contexts for MbedTLS handles (#1355) @widgetii: "Recently after studying [https-client.c code](https://github.com/libevent/libevent/blob/master/sample/https-client.c#L532) I found that I cannot use MbedTLS with `bufferevent_mbedtls_socket_new` same way as for OpenSSL in other than hello-world code. In mentioned sample code, ssl context is created by `SSL_new()` (as heap-based pointer), but for MbedTLS stack value is used. The issue is in different semantics because OpenSSL is responsible for memory allocation and release for its context, but for MbedTLS it turns out user should do the same manually. I expect that in both cases, setting option `BEV_OPT_CLOSE_ON_FREE` will free all linked resources, but in case of MbedTLS I have memory leak after connection is closed. My proposal is: 1. Provide new `mbedtls_ssl_new` helper-function for end-user that do the same job as `SSL_new()` and use it and example in sample: ```c mbedtls_ssl_context *mbedtls_ssl_new(const mbedtls_ssl_config *conf) { mbedtls_ssl_context *ssl = calloc(1, sizeof(*ssl)); mbedtls_ssl_init(ssl); mbedtls_ssl_setup(ssl, conf); return ssl; } ``` 2. Add `free(ctx->ssl)` right after https://github.com/libevent/libevent/blob/master/bufferevent_mbedtls.c#L68" Fixes: #1354
Dmitry Ilyin aa163a4f 2022-10-04T21:42:30 Fix memleak in regress tests
Dmitry Ilyin 10ed1f1c 2022-10-04T17:57:01 Change code for samples
Dmitry Ilyin 88317a4e 2022-10-04T17:49:22 Add helpers and all regress tests are passed
jackerli(李剑) b5b4c7fe 2022-09-28T16:41:59 fix: arc4_getword integer overflow, detected by -fsanitize=undefined
Dmitry Antipov 117ee9a0 2022-09-15T14:06:50 epoll: use epoll_pwait2() if available On GNU/Linux with epoll backend, prefer epoll_pwait2() if available, which is useful to support the timeout with microsecond precision.
zhenhaonong f8bb9d84 2022-09-16T15:55:56 Fix socketpair failure when temporary directory has non-latin character
Dmitry Ilyin 211c6653 2022-09-26T11:54:14 Add manual CMAKE_C_BYTE_ORDER set for old CMake
Azat Khuzhin ceb6bcd6 2022-09-14T22:14:28 ci: disable freebsd 13.0 builds (due to issues in the image) Before it fails with: exec ssh: pkg install -y mbedtls cmake python3 /bin/bash /Users/runner/work/_actions/vmactions/freebsd-vm/v0/run.sh execSSH Config file: freebsd-13.0.conf Pseudo-terminal will not be allocated because stdin is not a terminal. Warning: no access to tty (Bad file descriptor). Thus no job control in this shell. Installing pkg-1.18.3... Newer FreeBSD version for package pkg: To ignore this error set IGNORE_OSVERSION=yes - package: 1301000 - running kernel: 1300139 Ignore the mismatch and continue? [y/N]: Failed to install the following 1 package(s): /tmp//pkg.txz.18yvwm Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly, please wait... Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done Error: The process '/bin/bash' failed with exit code 1 And now with: ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/lib/libpython3.9.so.1.0 not found Commenting for now, anyway we do not need such huge CI matrix, because we have only public workers, and they are pretty busy. Cc: @Neilpang
Azat Khuzhin 9174ba92 2022-09-14T22:13:12 .github/workflows/build.yml: Cleanup trailing whitespaces
Dmitry Ilyin 53f9c420 2022-09-14T13:33:13 Fix conflict with SHA1 function from openssl
Dmitry Ilyin e8313084 2022-09-12T22:16:56 Add minimal WebSocket server implementation for evhttp (#1322) This adds few functions to use evhttp-based webserver to handle incoming WebSockets connections. We've tried to use both libevent and libwebsockets in our application, but found that we need to have different ports at the same time to handle standard HTTP and WebSockets traffic. This change can help to stick only with libevent library. Implementation was inspired by modified Libevent source code in ipush project [1]. [1]: https://github.com/sqfasd/ipush/tree/master/deps/libevent-2.0.21-stable Also, WebSocket-based chat server was added as a sample.
Keelan Cannoo bb41229f 2022-09-12T23:12:47 Make rekey interval less predictable (#1331)
Azat Khuzhin 039e8d96 2022-09-11T22:08:32 Add openssl-compat.h into HDR_PRIVATE Fixes: #1334
mareksm b19af675 2022-08-28T15:27:04 Fix non-std printf %p arguments (#1327) * Fix non-std printf %p arguments when running with -Werror -pedantic-errors Co-authored-by: Mareks Malnacs <mareks.malnacs>
Azat Khuzhin bb57cea3 2022-08-14T09:56:50 test: fix util/getaddrinfo for netbsd (v2) Fixes: c198b0ce ("test: fix util/getaddrinfo for netbsd") Fixes: #1316
Azat Khuzhin 77a9b60e 2022-08-14T00:46:48 Merge pull request #1315 from yogo1212/http_per_socket_bebcb In it's current form, libevent requires multiple struct evhttp objects to be created in order to enable listening on sockets with more than one type of encryption. This change allows specifying per-socket how the associated bufferevents should be created. Thus, it becomes possible to have multiple listening sockets with different encryption parameters using only one evttp.
Azat Khuzhin c198b0ce 2022-08-13T20:48:00 test: fix util/getaddrinfo for netbsd Fixes: #1316
Borys Smejda 86b5d2e9 2022-08-13T19:10:10 Fixed CMake configuration failure (libevent#1321) Deleted usage of CMake feature 'file(REAL_PATH' which is available from version 3.19 with an old 'get_filename_component' so that older version of CMake can still be used to configure the project.
Leon M. George 1bdc9135 2022-08-01T10:16:18 http: allow setting bevcb per socket Co-authored-by: Azat Khuzhin <azat@libevent.org> v2: remove handling of HTTP_BIND_IPV6
Azat Khuzhin a4cdc3c5 2022-08-13T19:51:02 test: allow to run init_ssl() multiple times
Azat Khuzhin 4ca417af 2022-08-13T19:51:45 test: add a comment for init_ssl() about suppressions for LSan
Dmitry Ilyin 99fd68ab 2022-08-07T13:51:48 Add check of mmap64 function and use it when available rather that mmap There can be issues on 32-bit architectures to mmap 2+GiB file, and to make this portable between different version of glibc, mmap64 was prefered over _FILE_OFFSET_BITS
neil b2aca3bc 2022-08-07T19:37:32 fix freebsd checks
neil c08ee399 2022-08-07T19:23:04 fix freebsd checks
neil 4f662d66 2022-08-07T18:56:00 Add freebsd CI checks ci/linux skip ci/macos skip ci/windows skip ci/mingw skip
Haowei Hsu 80c1e0b7 2022-07-29T20:58:27 Search library name of Debug for find_event_lib.
Haowei Hsu dd610b77 2022-07-29T20:49:35 Add postfix for Debug configuration.
Dmitry Ilyin 05a03d4a 2022-08-06T14:23:53 Add more HTTP_ response codes
Azat Khuzhin 3e7a7380 2022-07-12T21:57:41 ci: increase number of attempts to 5
Azat Khuzhin bfa526ce 2022-07-12T21:08:00 ci: add retries Right now it is possible for some tests to fail, because of lack of CPU time. And it is better to have green CI even if this will take longer.
Azat Khuzhin d3264949 2022-07-12T10:07:04 ci: use ubuntu 22.04 with clang 11 for sanitizers build (#1306) * ci-tsan-recent: test: fix unused variable in rand test (catched by newer clang) ci: use ubuntu 22.04 with clang 11 for sanitizers build
Azat Khuzhin 33fb0e35 2022-07-12T09:54:14 test: fix unused variable in rand test (catched by newer clang)
Azat Khuzhin 87c016a0 2022-07-12T08:03:36 ci: use ubuntu 22.04 with clang 11 for sanitizers build There are periodically some heap-use-after-free reported in ratelim tests by TSan, which I cannot reproduce locally and even on CI it is flaky. Let's try to use recent clang, maybe it fixes some issues in sanitizers. Refs: #1206
Azat Khuzhin 213a822a 2022-07-11T22:52:57 test: increase timeout significantly in dns/getaddrinfo_cancel_stress (for TSan) Fixes: #1304
Azat Khuzhin 15780dd2 2022-07-11T03:45:32 ci: disable broken mingw cmake builds (#1207)
Azat Khuzhin c90acbb6 2022-07-11T03:51:31 Slightly adjust badges markdown in README
Azat Khuzhin a3572af7 2022-07-11T03:50:16 ci: fix master/upstream workflow (syntax error)
Azat Khuzhin 9b7b549b 2022-07-11T03:47:45 Update CI status badge
Azat Khuzhin 587f26fb 2022-07-10T16:49:53 Rework CI to keep everything in one workflow (by using reusable workflow) Right now because we have separate workflows there is no one page with all the jobs, instead we have separate page for each workflow (linux, windows, ...) This is pretty inconvenient, so let's make it cleaner, and now we will have only two: - for pull requests - for upstream/master
Azat Khuzhin 5ff98dc1 2022-07-10T17:33:15 evdns: accept domains up to 254 long (previosly only 63 long was accepted) Previously evdns was using HOST_NAME_MAX, and define it to 255 *only* if it not set, however it does set on linux: $ egrep -r define.*HOST_NAME_MAX /usr/include/bits /usr/include/bits/local_lim.h:#define HOST_NAME_MAX 64 /usr/include/bits/posix1_lim.h:#define _POSIX_HOST_NAME_MAX 255 /usr/include/bits/confname.h:#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX But 64 should be the limit of the host component, not for the whole hostname, as also noted by @ploxiln So use our own EVDNS_NAME_MAX const, which is set to 255. Fixes: #1280
Azat Khuzhin 1933f6aa 2022-07-10T16:31:57 test: make dns/getaddrinfo_cancel_stress more deterministic Fixes: #1271 Follow-up for: 90bcf2d660b9b43cb8e747421d4938f08f935bd7
Azat Khuzhin 48727342 2022-07-10T16:18:08 Add a note that IOCP is experimental feature Refs: #1228
Azat Khuzhin 63ef005a 2022-07-10T15:47:00 ci: drop processing "ci skip" message in commit in favor of official skip Since [1] github actions official support skipping workflows based on the message. [1]: https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
Azat Khuzhin fc24a299 2022-07-10T15:10:20 ci: add ability skip specific workflow Public CI workers has pretty high load, and sometimes you need to test only specific workflow, i.e. windows. So let's add ability to limit which workflow should be run.
Azat Khuzhin 69e9f7ee 2022-07-10T13:55:32 Initial OpenSSL 3.0 support (#1288) * openssl-3: ci: use ubuntu 22.04 with OpenSSl 3.0 instead of building OpenSSL from sources ci: set LD_LIBRARY_PATH for openssl 3.0 build test: suppress warning for already defined SSL_get_peer_certificate autotools: print $OPENSSL_LIBS/$OPENSSL_INCS Suppress -Wunused-value for BIO_set_close() Use OPENSSL_VERSION_NUMBER over OPENSSL_VERSION_MAJOR (for compatibility) Attempt to add OpenSSL 3 to the Linux build matrix Initial OpenSSL 3.0 support
Azat Khuzhin 54078b30 2022-07-10T13:11:13 ci: use ubuntu 22.04 with OpenSSl 3.0 instead of building OpenSSL from sources
Azat Khuzhin fb549006 2022-07-10T12:24:42 ci: set LD_LIBRARY_PATH for openssl 3.0 build Fixes: /home/runner/work/libevent/libevent/build/test/.libs/regress: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
Azat Khuzhin d84c8851 2022-07-10T09:59:14 test: suppress warning for already defined SSL_get_peer_certificate build report: [1/2] Building C object CMakeFiles/regress.dir/test/regress_mbedtls.c.o /src/le/libevent/test/regress_mbedtls.c:50: warning: "SSL_get_peer_certificate" redefined 50 | #define SSL_get_peer_certificate mbedtls_ssl_get_peer_cert | In file included from /src/le/libevent/test/regress.h:139, from /src/le/libevent/test/regress_mbedtls.c:35: /src/oss/openssl/include/openssl/ssl.h:1799: note: this is the location of the previous definition 1799 | # define SSL_get_peer_certificate SSL_get1_peer_certificate | [2/2] Linking C executable bin/regress But this should be cleaned up.
Azat Khuzhin a0087e2c 2022-07-10T09:29:21 autotools: print $OPENSSL_LIBS/$OPENSSL_INCS
Azat Khuzhin e67085e5 2022-07-10T09:26:16 Suppress -Wunused-value for BIO_set_close()
Azat Khuzhin c22f2757 2022-07-09T23:27:23 Use OPENSSL_VERSION_NUMBER over OPENSSL_VERSION_MAJOR (for compatibility) Since OpenSSL 3.0 there is new OPENSSL_VERSION_MAJOR, but previous releases does not have it. So let's use plain old OPENSSL_VERSION_NUMBER to avoid more preprocessor macros.
William Marlow a29570a1 2022-06-19T10:45:57 Attempt to add OpenSSL 3 to the Linux build matrix v2: fix echo messages v3: fix autotools build (wrong path to pkg config)
William Marlow 29c420c4 2022-06-18T21:43:31 Initial OpenSSL 3.0 support * Don't use deprecated functions when building against OpenSSL 3.0. * Recognise that OpenSSL 3.0 can signal a dirty shutdown as a protocol. error in addition to the expected IO error produced by OpenSSL 1.1.1 * Update regress_mbedtls.c for compatibility with OpenSSL 3
Azat Khuzhin 20977eae 2022-07-09T23:22:00 Merge branch 'mbedtls-3' * mbedtls-3: sample/ssl-client-mbedtls.c: fix for MbedTLS 3 sample/ssl-client-mbedtls.c: break the loop on EOF sample/ssl-client-mbedtls.c: fix printing response in readcb Initial Mbed-TLS 3 support to get the GitHub Actions working again Support build dir of the MbedTLS
Azat Khuzhin acb7ef98 2022-07-09T21:17:06 ci/macos: remove separate openssl 1.1 from build matrix @ploxiln: On current homebrew, openssl@1.1 is the only openssl: [pierce@plo-mbp15 libevent]$ brew --prefix openssl /usr/local/opt/openssl@1.1 [pierce@plo-mbp15 libevent]$ brew info openssl openssl@1.1: stable 1.1.1g (bottled) [keg-only] Cryptography and SSL/TLS Toolkit @fanquake Indeed. OpenSSL 1.0 was removed from homebew in Homebrew/homebrew-core#46876. Related discussion also in Homebrew/homebrew-core#46454.
Azat Khuzhin 8bcbec77 2022-07-09T21:14:16 Merge branch 'fix-brew-autodetection' * fix-brew-autodetection: ci: fix cmake build w/o OPENSSL_ROOT_DIR ci: remove separate build for BREW_AUTODETECT_OPENSSL (use it by default) autotools: fix autodetection of openssl location via brew
Azat Khuzhin 6e310e3c 2022-07-09T20:05:35 sample/ssl-client-mbedtls.c: fix for MbedTLS 3 - use build_info.h over version.h - provide own certs P.S. since it is simpler then adding detection of the library version into autotools.
Azat Khuzhin ce20356a 2022-07-09T21:07:36 sample/ssl-client-mbedtls.c: break the loop on EOF
Azat Khuzhin fcf85e48 2022-07-09T21:03:36 sample/ssl-client-mbedtls.c: fix printing response in readcb
William Marlow 384c52e6 2022-06-23T23:06:14 Initial Mbed-TLS 3 support to get the GitHub Actions working again mingw has upgraded to Mbed-TLS 3.1.0, so all the mingw tests that need Mbed-TLS currently don't work. v2: add missing mbedtls/version.h into test/regress_mbedtls.c v3: suppress #warning "Including compat-2.x.h is deprecated" for mbedtls/compat-2.x.h
Azat Khuzhin 35e12a81 2022-07-09T20:40:52 Support build dir of the MbedTLS
Azat Khuzhin d881d062 2022-07-09T20:28:18 configure: fix AC_CHECK_FUNCS should use literals Error configure.ac:291: warning: AC_CHECK_FUNCS(getnameinfo ): you should use literals ../autoconf-2.71/lib/autoconf/functions.m4:117: AC_CHECK_FUNCS is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... configure.ac:291: the top level configure.ac:291: warning: AC_CHECK_FUNCS(getprotobynumber ): you should use literals ../autoconf-2.71/lib/autoconf/functions.m4:117: AC_CHECK_FUNCS is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... configure.ac:291: the top level configure.ac:291: warning: AC_CHECK_FUNCS(getservbyname ): you should use literals ../autoconf-2.71/lib/autoconf/functions.m4:117: AC_CHECK_FUNCS is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... configure.ac:291: the top level configure.ac:291: warning: AC_CHECK_FUNCS(inet_ntop ): you should use literals ../autoconf-2.71/lib/autoconf/functions.m4:117: AC_CHECK_FUNCS is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... configure.ac:291: the top level configure.ac:291: warning: AC_CHECK_FUNCS(inet_pton ): you should use literals ../autoconf-2.71/lib/autoconf/functions.m4:117: AC_CHECK_FUNCS is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... ../autoconf-2.71/lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... configure.ac:291: the top level
kenping d96457e1 2022-04-21T15:59:28 listener: Preserve last error in evconnlistener_new_bind() before close In function evconnlistener_new_bind() after go to "err:", The evutil_closesocket() would clear the error code( I found this under Windows ). User can not use EVUTIL_SOCKET_ERROR() to get the evconnlistener_new_bind()'s failing error. I add a err_code variable to store and restore the last error code. v2: rebased by azat to make the patch simpler
Azat Khuzhin a9441ed6 2022-07-09T18:43:29 ci: fix cmake build w/o OPENSSL_ROOT_DIR cmake build rules does not have detection of OPENSSL_ROOT_DIR via brew, so we cannot run such builds on CI. Always set OPENSSL_ROOT_DIR for cmake.
Azat Khuzhin 4954b27b 2022-07-09T18:41:39 ci: remove separate build for BREW_AUTODETECT_OPENSSL (use it by default)
Azat Khuzhin 8bad28d6 2022-07-09T18:40:35 autotools: fix autodetection of openssl location via brew
Azat Khuzhin 7aeecb60 2022-07-09T18:12:07 Merge branch 'Werror' * Werror: test: ignore -Walloc-size-larger-than error for calloc() returns ENOMEM Fix EVBASE_ACQUIRE_LOCK/EVBASE_RELEASE_LOCK for EVENT__DISABLE_THREAD_SUPPORT http: suppress "flags may be used uninitialized in this function" error Detech -Wno-unused-functions for GCC too cmake: add compiler version to the status message Fix BEV_LOCK/BEV_UNLOCK macros for EVENT__DISABLE_THREAD_SUPPORT Run builds with -Werror on CI for linux Fix -Werror for autotools Add -Wundef for cmake and fix EVENT__SIZEOF_TIME_T usage
Azat Khuzhin 89332176 2022-07-09T17:14:12 test: ignore -Walloc-size-larger-than error for calloc() returns ENOMEM Compiler report: /home/runner/work/libevent/libevent/test/regress_util.c: In function ‘test_event_calloc’: /home/runner/work/libevent/libevent/test/regress_util.c:1318:4: error: argument 2 value ‘9223372036854775815’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] p = mm_calloc(EV_SIZE_MAX/2, EV_SIZE_MAX/2 + 8); In file included from /home/runner/work/libevent/libevent/test/../util-internal.h:37:0, from /home/runner/work/libevent/libevent/test/regress_util.c:30: /usr/include/stdlib.h:541:14: note: in a call to allocation function ‘calloc’ declared here extern void *calloc (size_t __nmemb, size_t __size) v2: clang on CI does not have this option
Azat Khuzhin 648af99a 2022-07-09T17:20:26 Fix EVBASE_ACQUIRE_LOCK/EVBASE_RELEASE_LOCK for EVENT__DISABLE_THREAD_SUPPORT
Azat Khuzhin c8501afc 2022-07-09T17:17:38 http: suppress "flags may be used uninitialized in this function" error Some GCC reports [1]: /home/runner/work/libevent/libevent/http.c: In function ‘evhttp_make_header’: /home/runner/work/libevent/libevent/http.c:503:14: error: ‘flags’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ev_uint16_t flags; ^~~~~ /home/runner/work/libevent/libevent/http.c: In function ‘evhttp_get_body’: /home/runner/work/libevent/libevent/http.c:2354:14: error: ‘flags’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ev_uint16_t flags; ^~~~~ [1]: https://github.com/libevent/libevent/runs/7263518338?check_suite_focus=true#logs
Azat Khuzhin 39604493 2022-07-09T17:08:21 Detech -Wno-unused-functions for GCC too Otherwise build fails [1]: /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/minheap-internal.h:64:6: error: ‘min_heap_ctor_’ defined but not used [-Werror=unused-function] void min_heap_ctor_(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; } ^~~~~~~~~~~~~~ In file included from /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/buffer.c:91:0: /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/bufferevent-internal.h:414:1: error: ‘bufferevent_trigger_nolock_’ defined but not used [-Werror=unused-function] bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/buffer.c:89:0: /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/evthread-internal.h:140:1: error: ‘EVLOCK_TRY_LOCK_’ defined but not used [-Werror=unused-function] EVLOCK_TRY_LOCK_(void *lock) [1]: https://github.com/libevent/libevent/runs/7263518180?check_suite_focus=true
Azat Khuzhin 92b73c7d 2022-07-09T15:45:34 cmake: add compiler version to the status message
Azat Khuzhin 09550714 2022-07-09T15:38:56 Fix BEV_LOCK/BEV_UNLOCK macros for EVENT__DISABLE_THREAD_SUPPORT
Azat Khuzhin 1915b564 2022-07-09T14:47:12 Run builds with -Werror on CI for linux
Azat Khuzhin 03945889 2022-07-09T14:43:39 Fix -Werror for autotools
Azat Khuzhin f5ad737d 2022-07-09T14:22:38 Add -Wundef for cmake and fix EVENT__SIZEOF_TIME_T usage Note, autotools already supports it.
Azat Khuzhin 1bc62ce1 2022-07-09T14:13:57 https-client: fix strndup() for mingw build Right now it still reports [1]: 2022-07-09T10:53:05.4152800Z ../sample/https-client.c:558:43: warning: implicit declaration of function 'strndup' [-Wimplicit-function-declaration] 2022-07-09T10:53:05.4153300Z 558 | char *host_ipv6 = strndup(&host[1], strlen(&host[1]) - 1); 2022-07-09T10:53:05.4153651Z | ^~~~~~~ 2022-07-09T10:53:05.4154095Z ../sample/https-client.c:558:43: warning: incompatible implicit declaration of built-in function 'strndup' [-Wbuiltin-declaration- [1]: https://github.com/libevent/libevent/runs/7263194178?check_suite_focus=true
Azat Khuzhin 29032da6 2022-07-09T13:35:54 Fix some OpenSSL 3 test issues (#1291) These are updates to help with OpenSSL 3 compilation. I found https://github.com/libevent/libevent/pull/1288 after I started this, but these seem independent, and fix a different set of problems: - First off, OpenSSL 3 does not by default allow signing with SHA1 digests - moving this to SHA256 universally at this point seems a better idea than continuing to use the insecure SHA1 for older OpenSSL versions. This fixes X509_sign failing in regress_openssl for a number of tests, eg: ``` regress: http/https_openssl_basic: FAIL ../test/regress_openssl.c:106: assert(0 != X509_sign(x509, key, EVP_sha1()))[Lost connection!] http/https_openssl_filter_basic: FAIL ../test/regress_openssl.c:106: assert(0 != X509_sign(x509, key, EVP_sha1()))[Lost connection!] http/https_openssl_simple: ... ``` - Secondly, when using TLS 1.3, there's no support for renegotiation, so for the renegotiation tests, we need to disable TLS v1.3, and expect to negotiate TLS 1.1 or 1.2 Fixes: #661 * upstream/pr/1291: OpenSSL 3 fixes: Disable TLS 1.3 when testing renegotiation support OpenSSL 3 fixes: use SHA256 instead of SHA1
William Marlow e43376df 2022-06-18T21:43:31 Add missing strndup function on Windows to fix build on MSVC 2022 v2: Only define strndup on non-Mingw32 Windows
fanquake bf3ce77f 2022-06-23T13:38:14 build: only try silence options if they exist Otherwise GCC will warn. i.e: ```bash CCLD libevent_openssl.la cc1: note: unrecognized command-line option ‘-Wno-void-pointer-to-enum-cast’ may have been intended to silence earlier diagnostics CCLD libevent_mbedtls.la ```
Peter Edwards 187f6b91 2022-06-27T22:41:47 OpenSSL 3 fixes: Disable TLS 1.3 when testing renegotiation support TLS 1.3 does not support renegotation - it has been removed from the protocol. Disable TLS 1.3 when testing this, so we negotiate an older protocol version
Peter Edwards e563c9b2 2022-06-27T22:00:05 OpenSSL 3 fixes: use SHA256 instead of SHA1 OpenSSL 3.x does not support signing certificates with SHA1 by default. Use SHA256 instead.
cui fliter 1c204d55 2022-06-13T04:58:50 Fix some typos (#1284) Signed-off-by: cuishuang <imcusg@gmail.com>
zhongzedu 5cc2ff88 2022-05-09T16:33:36 fix grammar in comment