yuangongji
92b9109ef8
fix CI: Install vcpkg through the source code to temporarily solve the windows CI problem
2020-08-05 12:00:05 +08:00
Gerry Garvey
eb7bed03c4
Convert from WinCrypt to Windows BCrypt
...
Fixes : #1069
2020-08-02 18:27:10 +03:00
Gerry Garvey
efa57159dd
Handle return value from getrandom()
2020-08-02 10:02:34 -04:00
Azat Khuzhin
62c152d9a7
Remove reduntant variables in workflows with deploy
...
Fixes: bfbbc882 ("Change user.name/user.email to robot for deploy via github actions")
2020-07-28 11:04:16 +03:00
Azat Khuzhin
bfbbc88296
Change user.name/user.email to robot for deploy via github actions
2020-07-28 11:02:59 +03:00
Azat Khuzhin
eeeed1e1bb
test/dns: fix initialize_nameservers when there is ipv6 in /etc/resolv.conf
...
Fixes : #1060
2020-07-28 01:19:55 +03:00
Pierce Lopez
65199178c6
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.
2020-07-26 18:01:35 -04:00
okhowang(王沛文)
85c6759926
fix: compat mbedtls < 2.4
2020-07-24 17:19:14 +08:00
Azat Khuzhin
948ad30435
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
2020-07-23 23:41:31 +03:00
Azat Khuzhin
50dac7aded
ci/doxygen: install missing libmbedtls-dev
2020-07-23 02:01:18 +03:00
Azat Khuzhin
8ec4682623
ci/coverage: add missing libmbedtls-dev
2020-07-23 01:09:11 +03:00
Azat Khuzhin
e458696c1e
le-proxy: ignore SIGPIPE
...
Fixes : #1057
2020-07-23 00:28:09 +03:00
Azat Khuzhin
53e53b018b
test/regress_buffer.c: fix -Wbad-function-cast (in some specific env)
...
Fixes : #1054
2020-07-23 00:22:45 +03:00
Azat Khuzhin
0e339b04b5
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
2020-07-23 00:16:24 +03:00
Azat Khuzhin
1bfbbdf2b4
test: rename ssl/* -> openssl/*
2020-07-22 23:10:26 +03:00
Azat Khuzhin
5671575a1c
Join le_ssl_ops.post_init with le_ssl_ops.init
2020-07-22 23:08:50 +03:00
Azat Khuzhin
e1cdf1a182
Update LICENSE for ssl-client-mbedtls.c
2020-07-22 23:04:02 +03:00
okhowang(王沛文)
d095b834a9
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.
2020-07-22 23:03:17 +03:00
okhowang(王沛文)
dad699cc04
add mbedtls to CI
2020-07-22 22:53:23 +03:00
okhowang(王沛文)
028385f685
fix build system and add test and cleanup code
2020-07-22 22:53:23 +03:00
Jesse Fang
8218777d44
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
2020-07-22 22:53:23 +03:00
Jesse Fang
7680409aa1
simple https client example using mbedtls
...
Based on mbedtls's source code programs/ssl/ssl_client1.c
2020-07-22 22:52:58 +03:00
Jesse Fang
b28effa950
mbedtls based SSL implementation
...
prototype is libevent-2.1.11-stable libevent_openssl.c
2020-07-22 22:52:58 +03:00
fanquake
79dc8789f5
doc: fix typo in thread.h
...
s/evthred_use_pthreads_with_flags/evthread_use_pthreads_with_flags/
2020-07-20 21:59:10 +08:00
Azat Khuzhin
883587a9bf
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
2020-07-10 22:18:59 +03:00
fanquake
97a899d9b4
build: remove -Wstrict-aliasing as strict-aliasing is disabled
...
Note that -Wstrict-aliasing is also include in -Wall.
2020-07-07 13:58:47 +08:00
fanquake
28e3105072
build: move automake options into AM_INIT_AUTOMAKE call
2020-07-07 13:57:35 +08:00
fanquake
0a537b25dd
build: remove commented code from configure.ac
2020-07-07 13:57:34 +08:00
fanquake
0ea7f70744
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.
2020-07-07 13:57:34 +08:00
fanquake
ffb09b16ab
build: add ax_check_compile_flag macro
2020-07-07 13:57:34 +08:00
Azat Khuzhin
e9a6b12769
ci/linux: create dist artifact only if dist archive was built
...
Fixes: 512c88ce ("ci/linux: add dist check")
2020-07-05 14:53:08 +03:00
Azat Khuzhin
f6bfa8b3e3
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)
2020-07-05 13:16:52 +03:00
Azat Khuzhin
4edfe6ad17
select: requires reinit (otherwise it leaks signal handlers)
...
Fixes: main/fork under SELECT with ASAN
2020-07-05 13:16:03 +03:00
Azat Khuzhin
c51c09b8ee
poll: requires reinit (otherwise it leaks signal handlers)
...
Fixes: main/fork under POLL with ASAN
2020-07-05 13:15:37 +03:00
Azat Khuzhin
90bcf2d660
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.
2020-07-05 12:16:52 +03:00
Azat Khuzhin
ba19b356bf
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
2020-07-05 11:46:22 +03:00
Azat Khuzhin
9da1743b41
ci: set build type to debug with sanitizers
2020-07-05 11:21:04 +03:00
Azat Khuzhin
7b9ba3b717
test: really disable bufferevent_pair_release_lock under ASAN (and fix gcc)
2020-07-05 11:19:10 +03:00
Azat Khuzhin
e2f938c04f
test-closed: fix leak
2020-07-05 11:08:05 +03:00
Pierce Lopez
b6497fa148
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
2020-07-04 16:01:41 -04:00
Azat Khuzhin
9ca7a492f5
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
2020-07-03 09:27:20 +03:00
Azat Khuzhin
1cea01d6d5
Add abi-check report into artifacts
2020-06-28 17:10:03 +03:00
fanquake
e05ee6d3b5
build: consolidate darwin compile flag additions in configure
...
This is mostly move-only, apart from some changes to comments.
2020-06-28 19:34:14 +08:00
fanquake
8ac10b6bf7
build: consistently use dnl for comments in configure.ac
2020-06-28 19:34:10 +08:00
Azat Khuzhin
0ac3cfc0b7
test: add getaddrinfo(AI_ADDRCONFIG) test (off by default)
2020-06-26 11:32:59 +03:00
fanquake
ff4ec5fdb0
build: remove duplicate -Wredundant-decls
2020-06-26 14:35:41 +08:00
Azat Khuzhin
d5aa783bb2
Merge branch 'tests-under-sanitizers'
...
* tests-under-sanitizers:
test: fix memory leaks for https (add BEV_OPT_CLOSE_ON_FREE)
test: "fix" (with a quirk) leak in ssl/bufferevent_wm (w/o defer callbacks)
test: disable bufferevent/bufferevent_pair_release_lock under ASAN (too tricky)
test: detect test failures if atexit handler calls _exit(!0 ) (sanitizers)
Add LSAN suppressions (for OpenSSL temporary quirk)
Add TSAN suppressions
ci: run tests under sanitizers
Fixes : #955
2020-06-25 23:16:16 +03:00
Azat Khuzhin
ec94a6bb3f
test: fix memory leaks for https (add BEV_OPT_CLOSE_ON_FREE)
...
- http/https_filter_basic
- http/https_filter_chunk_out
2020-06-25 22:57:53 +03:00
Azat Khuzhin
cdbb2373f4
test: "fix" (with a quirk) leak in ssl/bufferevent_wm (w/o defer callbacks)
2020-06-25 22:57:40 +03:00
Azat Khuzhin
3b13a64789
test: disable bufferevent/bufferevent_pair_release_lock under ASAN (too tricky)
...
And cannot be suppressed with suppressions due to setup routines.
2020-06-25 22:57:40 +03:00