|
78e8541a
|
2021-03-28T10:35:22
|
|
build: remove no-longer used checks for vasprintf
From what I can tell the last usage was removed in
8d1317d71c46e27c5073d3429a64af69de0351a6.
|
|
4c29b01c
|
2021-03-28T10:57:11
|
|
build: remove splice implementation fragments
Looks like a `splice` implementation was planned, but has clearly never
eventuated (the TODO comment is from ~12 years ago, in
8b5bd77415fb6634fadf08357676926fecf5f032). For now, it's probably better
to remove the unused code/correct the docs.
|
|
8e5e7bb8
|
2021-03-23T09:40:30
|
|
ci: fix upload-artifacts for linux dist build
Fixes [1]:
Run actions/upload-artifact@v1
Error: Path does not exist /home/runner/work/libevent/libevent/build
Error: Exit code 1 returned from process: file name '/home/runner/runners/2.277.1/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.PublishArtifact, Runner.Plugins"'.
[1]: https://github.com/libevent/libevent/runs/2172680722?check_suite_focus=true
|
|
3b9b655d
|
2021-03-23T09:10:00
|
|
Merge branch 'http-fix-fd-leak'
* http-fix-fd-leak:
http: fix fd leak on fd reset (by using bufferevent_replacefd())
bufferevent: introduce bufferevent_replacefd() (like setfd() but also close fd)
Fixes: #1143
|
|
2385638e
|
2021-03-23T09:02:39
|
|
http: fix fd leak on fd reset (by using bufferevent_replacefd())
Fixes: afa66ea4 ("http: eliminate redundant bev fd manipulating and caching [WIP]")
|
|
aea752b6
|
2021-03-23T09:00:24
|
|
bufferevent: introduce bufferevent_replacefd() (like setfd() but also close fd)
|
|
8e6090d0
|
2021-03-23T09:52:14
|
|
build: use AC_CHECK_LIB over AC_HAVE_LIBRARY
AC_HAVE_LIBRARY is deprecated, see
https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Obsolete-Macros.html,
and has been prior to Autoconf 2.67, which is the minimum required by
the project. It's usage also causes warnings with newer versions of autoconf:
```bash
configure.ac:319: warning: The macro `AC_HAVE_LIBRARY' is obsolete.
configure.ac:319: You should run autoupdate.
```
`AC_HAVE_LIBRARY` was introduced in #969, although it's not clear why it
was decided to revert to using an obselete macro.
|
|
00b92f42
|
2021-02-16T13:26:44
|
|
fix compile error in VS2012 in evutil_gettimeofday()
Move static variable definition before other statement, to prevent
compile error in VS2012.
Fixes: #1135
|
|
d13b7bbf
|
2021-02-05T18:54:30
|
|
http: fix invalid unsigned arithmetic
|
|
bc25889f
|
2021-02-03T14:19:57
|
|
Check return value of evbuffer_remove() in bufferevent_read()
The conflict cast convertion between the return value of
bufferevent_read() and evbuffer_remove(), int(-1)->size_t(An undefined
maximum)
Add test case of bufferevent_read() should return 0 in case of
evbuffer_remove() returns -1
Fixes: #1132
|
|
f17eb6f5
|
2021-01-18T23:23:42
|
|
test/regress_http: cover reading of chunked payload by server
This is an example with transfer-encoding by client via bufferevent for
the #1131
|
|
617ba838
|
2021-01-09T17:19:27
|
|
evdns: add max-probe-timeout/probe-backoff-factor settings
I recently found that when the network status changed when calling
bufferevent_socket_connect_hostname (e.g. switching between several
WIFIs), all DNS servers would fail, and the timeout of probe would be
very long if there were many DNS requests. I want libevent to support
manual setting of MAX_PROBE_TIMEOUT and TIMEOUT_BACKOFF_FACTOR
So move hardcoded MAX_PROBE_TIMEOUT and TIMEOUT_BACKOFF_FACTOR into
struct, and allow changing them.
|
|
c5e4391b
|
2020-12-26T09:07:07
|
|
doc: remove dead link
The link is dead and an archived page cannot be found in the
web.archive.org.
|
|
657e1806
|
2020-11-23T17:24:36
|
|
cmake: do not link libevent with libevent_core
When add_event_library macro was called without the INNER_LIBRARIES parameter, it reused the
value set by a previous call, since the INNER_LIBRARIES variable was not reset.
|
|
59e31c96
|
2020-11-05T00:57:39
|
|
Do not try to do SSL handshake if the connect() fails
This will avoid this icky error:
$ https-client -4 -url https://127.1
some request failed - no idea which one though!
error:00000005:lib(0):func(0):DH lib
And instead will report only:
$ https-client -4 -url https://127.1
some request failed - no idea which one though!
socket error = Connection refused (111)
Refs: #1115
|
|
4f8a6320
|
2020-11-02T10:01:41
|
|
Merge branch 'macos-brew-openssl-v2'
By Azat Khuzhin (2) and fanquake (1)
* macos-brew-openssl-v2:
Add autodetection of openssl via brew into build matrix
cmake: find openssl prefix via brew
autotools: attempt to find OpenSSL via homebrew on macOS
Closes: #1050 (cherry picked one patch from it)
|
|
29b1404b
|
2020-11-02T00:39:26
|
|
Add autodetection of openssl via brew into build matrix
|
|
1a242e1c
|
2020-11-01T01:39:02
|
|
cmake: find openssl prefix via brew
|
|
72d877a2
|
2020-07-07T14:58:29
|
|
autotools: attempt to find OpenSSL via homebrew on macOS
When compiling for macOS, where users will likely have OpenSSL installed
via brew, rather than available on the system, use brew --prefix to
figure out where OpenSSL is, and then augment the pkg-config path so
that libs are found.
|
|
8d21ddcf
|
2020-11-01T00:59:16
|
|
Fix bufferevent_ssl_*flags() w/ disabled OpenSSL but enabled mbedTLS
|
|
8daa1aba
|
2020-10-31T23:04:55
|
|
Merge branch 'ssl-nagle'
* ssl-nagle:
Introduce new BUFFEREVENT_SSL_BATCH_WRITE flag to avoid Nagle effect in SSL
Introduce new API for flags of the SSL bufferevent
|
|
a490172d
|
2020-10-31T22:53:31
|
|
Introduce new BUFFEREVENT_SSL_BATCH_WRITE flag to avoid Nagle effect in SSL
|
|
7e0fc878
|
2020-10-31T21:45:22
|
|
Introduce new API for flags of the SSL bufferevent
Introduce more generic API (like for evbuffer):
- bufferevent_ssl_set_flags()
- bufferevent_ssl_clear_flags()
- bufferevent_ssl_get_flags()
And deprecate existing:
- bufferevent_openssl_get_allow_dirty_shutdown()
- bufferevent_openssl_set_allow_dirty_shutdown()
- bufferevent_mbedtls_get_allow_dirty_shutdown()
- bufferevent_mbedtls_set_allow_dirty_shutdown()
|
|
587f6c83
|
2020-10-31T22:50:11
|
|
Merge branch 'ssl-fixes-after-mbedtls'
* ssl-fixes-after-mbedtls:
Fix BEV_IS_SSL() macro
Fix preprocessor condition for BEV_IS_SSL()
Remove reduntant BEV_IS_MBEDTLS
Refs: #1028
|
|
2484500a
|
2020-10-31T22:48:37
|
|
Fix BEV_IS_SSL() macro
We cannot use the same trick with external declaration,
since there are copy of bufferevent_ops_ssl in each library:
- openssl
- mbedlts
However we can just compare the name of the bufferevent type for now.
(It is totally fine to use memcmp() here since it will be optimized by the compiler).
|
|
db6e22c7
|
2020-10-31T22:41:16
|
|
Fix preprocessor condition for BEV_IS_SSL()
|
|
39ca97ef
|
2020-10-31T22:27:18
|
|
Remove reduntant BEV_IS_MBEDTLS
|
|
afa66ea4
|
2019-09-04T00:56:20
|
|
http: eliminate redundant bev fd manipulating and caching [WIP]
At the very beginning we reset the bufferevent fd (if bev has it), which
is not a good idea, since if user passes bufferevent with existing fd he
has some intention.
So we need to:
- use BEV_OPT_CLOSE_ON_FREE for default bufferevent_socket_new() (to
avoid manual shutdown/closee)
- drop getsockopt(SOL_SOCKET, SO_ERROR), since bufferevent already has
evutil_socket_finished_connecting_()
- drop supperior bufferevent_setfd(bev, -1) in
evhttp_connection_connect_()
Closes: #795
Refs: #875
|
|
67180f8c
|
2020-10-27T02:15:38
|
|
Merge branch 'ipv6-tiny-improvements'
* ipv6-tiny-improvements:
http: add EVHTTP_URI_HOST_STRIP_BRACKETS
http-server: add -H option to change listen address
https-client: add newline into error messages
https-client: add -4/-6 switches
|
|
e91c4363
|
2020-10-27T01:40:34
|
|
http: add EVHTTP_URI_HOST_STRIP_BRACKETS
Refs: #1115
|
|
eb822ac7
|
2020-10-27T01:22:59
|
|
http-server: add -H option to change listen address
|
|
6135248a
|
2020-10-27T01:19:40
|
|
https-client: add newline into error messages
|
|
f51ec253
|
2020-10-27T01:17:44
|
|
https-client: add -4/-6 switches
|
|
22872176
|
2020-10-15T23:23:15
|
|
becat: add timeout (client/server) and verbosity (event_enable_debug_logging())
|
|
6c644949
|
2020-10-11T03:23:14
|
|
Change log message in evutil_make_socket_nonblocking in win32
Co-authored-by: guoxiang2 <guoxiang2@yy.com>
|
|
19d0bdfe
|
2020-10-04T22:56:30
|
|
Change prefix for man pages from "le_" to "libevent_"
As pointed by @kloczek:
"With only two characters it would be harder to guess under what kind of name are libevent lvl 3 man pages.
Longer name with bash/fix/zsh tab competition should not be a problem :)"
Refs: #1099
|
|
21b91692
|
2020-10-04T19:55:52
|
|
Add prefix (le_) for man pages
This will:
- avoid overlapping (since there is util.h.3 page)
- group everything under some prefix (man le_<TAB><TAB> will show everything)
Fixes: #1099
|
|
3012c438
|
2020-10-04T19:48:34
|
|
Drop DOXYGEN_MAN_LINKS unsupported cmake flag
MAN_LINKS is not a variable in Doxyfile anyway.
|
|
852af060
|
2020-10-04T17:44:34
|
|
http-server: add cli argument for max body size
|
|
56e12131
|
2020-09-18T16:34:34
|
|
Remove dead code from bufferevent_socket_connect
|
|
9b270c5e
|
2020-09-16T08:10:11
|
|
Generate only real man pages with doxygen (MAN_LINKS=NO)
WIth MAN_LINKS=YES doxygen will generate ton's of man pages for each
field, function and so on, but it will not contain anything useful
except for link to another man page (header).
So to avoid man pages clashing, disable MAN_LINKS, and this will
generate man pages only for explicitly documented parts.
But even after this we have pretty non-unique man pages names:
$ find install/ -name '*.3'
install/share/man/man3/util.h.3
...
Looks like we should add prefix for each of them...
But let's see if there will be a problem.
Fixes: #1097
|
|
31a5cfd3
|
2020-09-16T08:25:20
|
|
Remove man pages from repo (they can be generated via doxygen)
The problem with this man pages are:
- they are likely outdated
- they don't have install target
- and besides quality of man pages generated by doxygen not worse
|
|
b45a02ef
|
2020-09-16T11:31:33
|
|
sample: add https-client-mbedtls
|
|
53c68675
|
2020-09-15T18:15:24
|
|
test: fix windows error when mbedtls https
|
|
67520709
|
2020-09-14T21:37:50
|
|
Merge #1087 - tests for https with mbedtls
* upstream/pr/1087:
test: add https with mbedtls
bufferevent_openssl: fix -Wcast-function-type for SSL_pending
|
|
a7d3cd40
|
2020-09-14T21:30:02
|
|
Add build w/o any SSL support (i.e. w/o openssl and mbedtls)
This pure build w/o SSL has been removed in mbedtls PR - #1028
|
|
2403ae57
|
2020-09-06T15:33:32
|
|
test: add https with mbedtls
|
|
f07898e3
|
2020-07-25T17:17:46
|
|
bufferevent_openssl: fix -Wcast-function-type for SSL_pending
Introduced-in: #1028
|
|
a18301a2
|
2020-09-08T15:38:16
|
|
http: const out address param to evcon_get_peer
|
|
02428d9a
|
2020-09-01T01:08:16
|
|
build: fix building under windows with thread support
Fixes: 972289f3 ("Detect existence of pthread_mutexattr_setprotocol()")
|
|
c2a9ecff
|
2020-08-29T18:41:39
|
|
Fix: long -> enum evhttp_cmd_type type
|
|
2338f27e
|
2020-08-29T01:15:20
|
|
test/regress_dns: fix -Wmaybe-uninitialized
Was not noticed since it is reported only with optimization enabled, as
stated in gcc(1):
The effectiveness of some warnings depends on optimizations also
being enabled. For example -Wsuggest-final-types is more effective with
link-time optimization and -Wmaybe-uninitialized does not warn at all
unless optimization is enabled.
And interesting thing is that it is reported only for -O2, not for -O3,
that's why I did not catched it in both cmake env that I had:
- debug (it has -O0)
- release (it has -O3)
While autoconf has -O2.
|
|
972289f3
|
2020-08-29T01:15:20
|
|
Detect existence of pthread_mutexattr_setprotocol()
Fixes: #1084
|
|
e3e7bb21
|
2020-08-11T02:12:23
|
|
build: add doxygen to all
Fixes: 7e6c5fb4 ("build: do not try install doxygen man pages if they were not requested")
Fixes: #1075
Fixes: #886
|
|
7e6c5fb4
|
2020-08-06T10:24:55
|
|
build: do not try install doxygen man pages if they were not requested
Fixes: #1075
|
|
4cf0d712
|
2020-08-06T10:12:07
|
|
Merge #1074
yuangongji:
"Fix CI failures #1071
- Install vcpkg through the source code to temporarily solve the windows CI problem.
- Update cache version and replace setup-msys2."
* upstream/pr/1074:
fix CI:Update cache version and replace setup-msys2
fix CI: Install vcpkg through the source code to temporarily solve the windows CI problem
|
|
cf2ac1af
|
2020-08-05T12:12:08
|
|
fix CI:Update cache version and replace setup-msys2
|
|
92b9109e
|
2020-08-05T10:14:53
|
|
fix CI: Install vcpkg through the source code to temporarily solve the windows CI problem
|
|
eb7bed03
|
2020-08-01T16:10:48
|
|
Convert from WinCrypt to Windows BCrypt
Fixes: #1069
|
|
efa57159
|
2020-08-01T14:05:39
|
|
Handle return value from getrandom()
|
|
62c152d9
|
2020-07-28T11:03:46
|
|
Remove reduntant variables in workflows with deploy
Fixes: bfbbc882 ("Change user.name/user.email to robot for deploy via github actions")
|
|
bfbbc882
|
2020-07-28T11:02:15
|
|
Change user.name/user.email to robot for deploy via github actions
|
|
eeeed1e1
|
2020-07-28T01:19:28
|
|
test/dns: fix initialize_nameservers when there is ipv6 in /etc/resolv.conf
Fixes: #1060
|
|
65199178
|
2020-07-25T21:17:21
|
|
windows socketpair tmpfile: use random prefix
fixes #1058
GetTempFileNameA() takes an optional prefix, and a "unique" long value
which can optionally be zero, which causes it to automatically
increment until a not-yet-existing filename is found.
When libevent creates many AF_UNIX socketpairs on windows,
it slows down dramatically, due to always using the same blank prefix,
and GetTempFileNameA() needing to iterate through all the existing
socketpair filenames. With a present and varying prefix, it will have
much less need to iterate.
It was also possible for a race with other processes also using
blank-prefix tmpfile names to result in both trying to start using
the same name at the same time (because libevent deletes the file
and then re-creates it as a unix socket), which should now be
much less likely.
Unfortuantely, "much" is just a factor of 32k, because the prefix
is only 3 characters, and windows filesystems are case-insensitive,
so doing better would require more sophisticated windows API usage
and charset trickyness.
|
|
85c67599
|
2020-07-24T17:19:14
|
|
fix: compat mbedtls < 2.4
|
|
948ad304
|
2020-07-23T23:38:53
|
|
Fix bufferevent_get_{openssl,mbedtls}_error()
The bufferevent_get_openssl_error() returns unsigned long, so returning
-1 on error in unclear. Let's use 0.
Fixes: #1028
|
|
50dac7ad
|
2020-07-23T02:01:02
|
|
ci/doxygen: install missing libmbedtls-dev
|
|
8ec46826
|
2020-07-23T01:08:22
|
|
ci/coverage: add missing libmbedtls-dev
|
|
e458696c
|
2020-07-23T00:28:09
|
|
le-proxy: ignore SIGPIPE
Fixes: #1057
|
|
53e53b01
|
2020-07-23T00:22:45
|
|
test/regress_buffer.c: fix -Wbad-function-cast (in some specific env)
Fixes: #1054
|
|
0e339b04
|
2020-07-23T00:14:34
|
|
Merge branch 'mbedtls'
This patch set provides mbed TLS support.
The interface part (include/event2/bufferevent_ssl.h) LGTM, so this can
be safely merged (although there are some bits left).
Includes:
- bufferevent_mbedtls_*
- regress_mbedtls tests
Left:
- regress_http https_mbedtls support
- ChangeLog entry
* mbedtls:
test: rename ssl/* -> openssl/*
Join le_ssl_ops.post_init with le_ssl_ops.init
Update LICENSE for ssl-client-mbedtls.c
Merge ssl implementations (openssl and mbedtls)
add mbedtls to CI
fix build system and add test and cleanup code
mbed TLS cmake support
simple https client example using mbedtls
mbedtls based SSL implementation
|
|
1bfbbdf2
|
2020-07-22T23:10:17
|
|
test: rename ssl/* -> openssl/*
|
|
5671575a
|
2020-07-22T23:08:50
|
|
Join le_ssl_ops.post_init with le_ssl_ops.init
|
|
e1cdf1a1
|
2020-07-22T23:02:31
|
|
Update LICENSE for ssl-client-mbedtls.c
|
|
d095b834
|
2020-07-07T17:26:46
|
|
Merge ssl implementations (openssl and mbedtls)
This patch splits common part out to avoid copy-paste from the
- bufferevent_openssl.c
- bufferevent_mbedtls.c
It uses VFS/bufferevent-like approach, i.e. structure of callbacks.
|
|
dad699cc
|
2020-05-27T15:29:42
|
|
add mbedtls to CI
|
|
028385f6
|
2020-05-28T17:14:46
|
|
fix build system and add test and cleanup code
|
|
8218777d
|
2020-01-14T12:18:27
|
|
mbed TLS cmake support
FindMbedTLS.cmake is come from https://github.com/AVSystem/avs_commons/blob/master/cmake/FindMbedTLS.cmake, which is licensed under Apache 2.0
alternatives:
https://github.com/curl/curl/blob/master/CMake/FindMbedTLS.cmake without variable MBEDTLS_ROOT_DIR
https://github.com/libgit2/libgit2/blob/master/cmake/Modules/FindmbedTLS.cmake GPLv2 with a special Linking Exception
|
|
7680409a
|
2020-01-13T23:08:26
|
|
simple https client example using mbedtls
Based on mbedtls's source code programs/ssl/ssl_client1.c
|
|
b28effa9
|
2020-01-13T23:04:29
|
|
mbedtls based SSL implementation
prototype is libevent-2.1.11-stable libevent_openssl.c
|
|
79dc8789
|
2020-07-20T21:59:10
|
|
doc: fix typo in thread.h
s/evthred_use_pthreads_with_flags/evthread_use_pthreads_with_flags/
|
|
883587a9
|
2020-07-10T22:18:59
|
|
Merge #1048 -- append warning flags only if they are available (autotools)
* upstream/pr/1048:
build: remove -Wstrict-aliasing as strict-aliasing is disabled
build: move automake options into AM_INIT_AUTOMAKE call
build: remove commented code from configure.ac
build: use feature detection when adding compile flags
build: add ax_check_compile_flag macro
|
|
97a899d9
|
2020-07-07T13:58:47
|
|
build: remove -Wstrict-aliasing as strict-aliasing is disabled
Note that -Wstrict-aliasing is also include in -Wall.
|
|
28e31050
|
2020-07-03T16:02:09
|
|
build: move automake options into AM_INIT_AUTOMAKE call
|
|
0a537b25
|
2020-07-03T15:47:10
|
|
build: remove commented code from configure.ac
|
|
0ea7f707
|
2020-06-26T14:33:43
|
|
build: use feature detection when adding compile flags
Rather than trying to detect (potentially very old) GCC versions, just
test whether the flag works with the compiler, and add it to CLFAGS if
so.
-Werror is used to convert unknown flag warnings into errors, and
prevent their addition to CLFAGS.
|
|
ffb09b16
|
2020-06-26T14:04:26
|
|
build: add ax_check_compile_flag macro
|
|
e9a6b127
|
2020-07-05T13:55:53
|
|
ci/linux: create dist artifact only if dist archive was built
Fixes: 512c88ce ("ci/linux: add dist check")
|
|
f6bfa8b3
|
2020-07-05T13:16:52
|
|
Merge branch 'fix-signal-leak'
Fixes main/fork under ASAN (LSAN if to be precise)
* fix-signal-leak:
select: requires reinit (otherwise it leaks signal handlers)
poll: requires reinit (otherwise it leaks signal handlers)
|
|
4edfe6ad
|
2020-07-05T13:16:03
|
|
select: requires reinit (otherwise it leaks signal handlers)
Fixes: main/fork under SELECT with ASAN
|
|
c51c09b8
|
2020-07-05T13:14:36
|
|
poll: requires reinit (otherwise it leaks signal handlers)
Fixes: main/fork under POLL with ASAN
|
|
90bcf2d6
|
2020-07-05T11:59:32
|
|
test: fix leak in dns/getaddrinfo_cancel_stress
Some requests may get response (evutil_addrinfo) from gaic_server_cb,
in case of cancel_event (10000ms) will not be fast enough.
|
|
ba19b356
|
2020-07-05T11:45:56
|
|
test: fix UB in evbuffer/empty_reference_prepend_buffer
UBSAN reports:
test/regress_buffer.c:2360:2: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/string.h:140:33: note: nonnull attribute specified here
|
|
9da1743b
|
2020-07-05T11:21:04
|
|
ci: set build type to debug with sanitizers
|
|
7b9ba3b7
|
2020-07-05T11:14:18
|
|
test: really disable bufferevent_pair_release_lock under ASAN (and fix gcc)
|
|
e2f938c0
|
2020-07-05T11:08:05
|
|
test-closed: fix leak
|
|
b6497fa1
|
2020-07-04T15:55:22
|
|
build: do not disable deprecation warnings on macOS
this was for using openssl-0.9.8 included in macOS 10.7 - 10.12,
but it is long since time you really should not use that openssl
|
|
9ca7a492
|
2020-07-03T09:27:20
|
|
Merge #1046 -- build: misc configure changes
* upstream/pr/1046:
build: consolidate darwin compile flag additions in configure
build: consistently use dnl for comments in configure.ac
|
|
1cea01d6
|
2020-06-28T17:10:03
|
|
Add abi-check report into artifacts
|
|
e05ee6d3
|
2020-06-28T18:40:26
|
|
build: consolidate darwin compile flag additions in configure
This is mostly move-only, apart from some changes to comments.
|