5053 Commits

Author SHA1 Message Date
Kirill Rodriguez
5755befda6
fix a Werror error 2024-10-20 21:43:05 +01:00
Kirill Rodriguez
370d99244d
mbedtls3 does not support tls<1.3, and tls<1.3 does not support renegotiations. therefore, disable 2024-10-20 21:41:36 +01:00
Kirill Rodriguez
87c921f9fc
make sure cmake cache misses when configuration files change 2024-10-20 21:41:26 +01:00
Kirill Rodriguez
2321506d41 replace mbedtls@2 with mbedtls 2024-10-04 07:42:45 +00:00
Azat Khuzhin
f6e426c299
Move find_dependency() directly to LibeventConfig.cmake (#1726) 2024-10-04 06:45:52 +03:00
Azat Khuzhin
e23924c293 Fix LibeventConfig.cmake in case of no OpenSSL
Previously it fails with, due to empty OPENSSL_FOUND:

    CMake Error at /home/runner/work/libevent/libevent/build/LibeventConfig.cmake:64 (if):
      if given arguments:

        "3.30.3" "VERSION_LESS" "3.15.0" "AND" "1" "AND" "AND" "TRUE"

      Unknown arguments specified
2024-10-03 21:31:59 +02:00
Azat Khuzhin
68e18761ae Move find_dependency() directly to LibeventConfig.cmake
Patch-by: @ahuj9
Fixes: https://github.com/libevent/libevent/issues/1711
Follow-up for: https://github.com/libevent/libevent/pull/1544 (cc @kurtlau)
2024-10-03 21:27:17 +02:00
Wu, Zhenyu
8f1e4bd937 fix typo: bufferevent_set_callbacks should be bufferevent_setcb 2024-10-03 10:15:06 +03:00
Kirill Rd
d681a0d4f9
CI fixes for openbsd/android/freebsd (#1721)
the following changes are introduced:

* openbsd CI fails with "too many open files", fixed with `ulimit -n` (now it fails for a more test-specific reasons)
* android CI fails with `pipe2` method not found, fixed by removing cache
* bumped freebsd to 13.4 (and 14.1) as they [reached EOL](https://www.freebsd.org/releases/)
2024-10-03 09:09:21 +02:00
Kirill Rd
cd68743eeb
add android CI cmake builds (#1716)
* trying android-ci workflow

* focus on android

* fix workflow file

* another fix attempt

* update java

* added host targets

* added clause for skipping CI

* revert focus on android

* set push CI back to master branch

* fix CI cache key for android
2024-09-23 10:12:10 +02:00
Kirill Rodriguez
ccb18f5b0c fix cmake build error for android: threads not found 2024-09-21 23:39:58 +03:00
dependabot[bot]
aa04ba9341 build(deps): bump github/codeql-action in the github-actions group
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.25.15 to 3.26.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](afb54ba388...4dd16135b6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-15 00:09:58 +03:00
Orian
bb0d473bbb Add small note to event_active() documentation 2024-09-15 00:08:41 +03:00
icy17
628f39bb90 ws: fix potential NULL pointer dereference 2024-08-12 10:02:49 +02:00
icy17
d1a90d09dc tests: Fix potential NULL pointer dereference 2024-08-12 10:02:04 +02:00
dependabot[bot]
d3f6c78e3a build(deps): bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [ossf/scorecard-action](https://github.com/ossf/scorecard-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `ossf/scorecard-action` from 2.3.3 to 2.4.0
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

Updates `github/codeql-action` from 3.25.11 to 3.25.15
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b611370bb5...afb54ba388)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 00:27:05 +03:00
icy17
0499c51753
Document non-NULL parameters in public API (#1705) 2024-08-04 23:23:43 +02:00
Dmitry Ilyin
00c94beaf0 ws: allow Upgrade in Connection header anywhere
This will make it work for Firefox, which uses "Connection: keep-alive, Upgrade"
Reimplemented our own evutil_ascii_strcasestr function (same as
non-portable strcasestr)
2024-07-27 09:18:10 +03:00
Cœur
9848df54cc
http: disallow empty header names (#1690)
In theory, we could be more strict, since there is only a subset of allowed characters:
> ```
> tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
>                 / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
>                 / DIGIT / ALPHA
>                 ; any VCHAR, except delimiters
> ```

But I'd skip such verification, unless there is a legitimate interest (versus performances).

Fixes: #1686
2024-07-26 22:53:30 +02:00
Azat Khuzhin
7f23b5b5aa Add instruction for release tarballs validation with GPG keys
Fixes: https://github.com/libevent/libevent/issues/1691
2024-07-10 06:24:06 +02:00
Azat Khuzhin
9d735b4bea
Better error handling in event-read-fifo.c (#1673) 2024-07-09 23:34:00 +03:00
icy17
25f4439dbd sample/event-read-fifo: add proper exit path
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2024-07-09 07:12:47 +02:00
icy17
09738283d9 Fix potential Null pointer dereference in event-read-fifo.c 2024-07-09 07:12:20 +02:00
Azat Khuzhin
30d169b133
Better error path in test-changelist.c and EVUTIL_INVALID_SOCKET (#1679) 2024-07-08 23:20:26 +03:00
Cœur
5485887c47 Check against EVUTIL_INVALID_SOCKET 2024-07-08 10:20:47 +02:00
icy17
3f799ab675 test/test-changelist: add proper exit path 2024-07-08 10:20:47 +02:00
icy17
6f9f2f3a09 test/test-changelist.c: fix potential NULL pointer dereference 2024-07-08 10:19:35 +02:00
Azat Khuzhin
66428fb969 test-closed: fix -Werror=maybe-uninitialized
Follow-up for: https://github.com/libevent/libevent/pull/1680
2024-07-08 10:15:29 +02:00
Cœur
272bd7ddf0
Fix potential Null pointer dereference in test-closed.c (#1680)
* Fix potential Null pointer dereference in test-closed.c

* add err path

* code review: goto err after evutil_socketpair failure

* code review: goto err for event_config_new failure

---------

Co-authored-by: icy17 <1061499390@qq.com>
2024-07-08 10:13:08 +02:00
Cœur
49d6b4b099
samples: use evutil_socket_t instead and handle 64 bit Windows (#1682)
* Use evutil_socket_t instead in http server sample and handle 64 bit Windows

* Update http-server.c

* consistently using EV_SOCK_FMT for Windows compatibility

* code review: fix missing symbol strsignal

* Add evutil_strsignal() helper instead of strsignal() macro

---------

Co-authored-by: Hernan Martinez <hernan.c.martinez@gmail.com>
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2024-07-08 10:10:42 +02:00
Cœur
2bc831c889
Fix potential Null pointer dereference in test-time.c (#1681)
* Fix potential Null pointer dereference in test-time.c

* add err path

* code review: free events before base

---------

Co-authored-by: icy17 <1061499390@qq.com>
2024-07-08 10:08:58 +02:00
Azat Khuzhin
0bbaee6110 Disable persist-credentials for actions/checkout to improve security 2024-07-06 09:13:41 +02:00
Azat Khuzhin
7331c66b4d ci: limit artifacts
Refs: https://github.com/libevent/libevent/security/advisories/GHSA-f4cg-pcr2-495m
2024-07-06 09:00:38 +02:00
dependabot[bot]
7c20c21967 Bump github/codeql-action in the github-actions group
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.25.10 to 3.25.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](23acc5c183...b611370bb5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 22:51:54 +03:00
Andy Pan
96c259f1d9
tcpkeepalive: distinguish OS versions and use proper time units (#1669)
DragonFly BSD changed the time unit for TCP keep-alive from milliseconds to seconds since v5.8 and Solaris 11.4 added `TCP_KEEPIDLE`, `TCP_KEEPINTVL`, and `TCP_KEEPCNT` with time units in second while Solaris <11.4 still use `TCP_KEEPALIVE_THRESHOLD` and `TCP_KEEPALIVE_ABORT_THRESHOLD` with time units in millisecond.

Currently, we don't differentiate among DragonFly BSD versions but set the keepalive options with seconds, which will result in unexpected behaviors on DragonFlyBSD <5.8. This PR intends to fix the wrong usage of time units of TCP keepalive options on DragonFly BSD <5.8 and consolidate the logic of time units conversion for TCP keepalive across platforms.

In addition, this PR introduces a new custom macro for determining Solaris 11.4. This macro is expected to help us implement some new features for `libuv` using some abilities that only exist on Solaris 11.4 and other mainstream platforms in the future, considering that Oracle developed and released Solaris 11.4 to replenish plenty of features on Solaris that have already been implemented on other UNIX-like OSs but missing from Solaris <11.4, also bring a good deal of new features.
### References

- [Change tcp keepalive options from ms to seconds (DISRUPTIVE)](https://lists.dragonflybsd.org/pipermail/commits/2019-July/719125.html)
- [DragonFly BSD 5.8 release notes](https://www.dragonflybsd.org/release58/)
- [DragonFly TCP](https://man.dragonflybsd.org/?command=tcp&section=4)
- [Solaris 11.3 TCP](https://docs.oracle.com/cd/E86824_01/html/E54777/tcp-7p.html)
- [Solaris 11.4 TCP](https://docs.oracle.com/cd/E88353_01/html/E37851/tcp-4p.html)
- [Solaris 11.4 release notes](https://docs.oracle.com/cd/E37838_01/html/E60973/)

Signed-off-by: Andy Pan <i@andypan.me>
2024-06-26 06:10:00 +02:00
dependabot[bot]
90b9520f3c Bump the github-actions group across 1 directory with 3 updates
Bumps the github-actions group with 3 updates in the / directory: [coverallsapp/github-action](https://github.com/coverallsapp/github-action), [ossf/scorecard-action](https://github.com/ossf/scorecard-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `coverallsapp/github-action` from 2.2.3 to 2.3.0
- [Release notes](https://github.com/coverallsapp/github-action/releases)
- [Commits](3dfc556739...643bc377ff)

Updates `ossf/scorecard-action` from 2.3.1 to 2.3.3
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...dc50aa9510)

Updates `github/codeql-action` from 3.25.3 to 3.25.10
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](d39d31e687...23acc5c183)

---
updated-dependencies:
- dependency-name: coverallsapp/github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 10:59:28 +03:00
Cœur
78d29804db
gitignore cleanup (#1672) 2024-06-24 09:58:46 +02:00
Azat Khuzhin
e0d53cbcd5 ci: ignore lukka/run-vcpkg for updates by dependabot
Follow-up for: https://github.com/libevent/libevent/pull/1657
2024-06-24 09:47:22 +03:00
Cœur
e5181b153e
Cleanup EVENT_HAVE_ macros (#1645) 2024-06-23 21:37:49 +02:00
Cœur
8dd92069d6
Fix potential Null pointer dereference in bench_httpclient.c (#1676)
Co-authored-by: icy17 <1061499390@qq.com>
2024-06-23 21:15:23 +02:00
Cœur
5d830362dd
Fix potential Null pointer dereference in regress_dns.c (#1675)
Co-authored-by: icy17 <1061499390@qq.com>
2024-06-23 21:12:39 +02:00
Cœur
dabf4e132d
Fix potential Null pointer dereference in ws-chat-server.c (#1674)
Co-authored-by: icy17 <1061499390@qq.com>
2024-06-23 21:10:56 +02:00
Cœur
6d8c38afe7 Reducing the number of mingw warnings 2024-06-02 18:21:49 +03:00
Cœur
a0fc31bfe3 Sort symbols to check in cmake/autotools lexicographically 2024-06-02 10:25:55 +03:00
Azat Khuzhin
13678f370c
gcc: fix some compiler errors from the new GCC (#1658)
gcc: fix some compiler errors from the new GCC
2024-06-02 00:53:58 +03:00
Azat Khuzhin
3d85362557 ci: secure github.event.repository.owner.name
Even though this should not be a problem, let's do this anyway.

Reported-by: Francesco Garofalo
2024-06-01 19:57:01 +03:00
fanquake
f5b6104319 test: use evutil_timerclear over timerclear 2024-06-01 19:33:53 +03:00
Cœur
b202a72be4 temp size assert for #1632 2024-06-01 19:29:34 +03:00
Cœur
5fbc00a3cc event_warn mmap format 2024-06-01 19:29:34 +03:00
Andy Pan
fef2a8678b Fix -Wcast-function-type errors
---------

Signed-off-by: Andy Pan <i@andypan.me>
2024-06-01 18:24:43 +02:00