Jan Beich
d057c45e8f
Unbreak build with LibreSSL after openssl 1.1 support added
...
Fixes: 3e9e0a0d46e4 ("Make it build using OpenSSL 1.1.0")
Fixes : #445
2017-01-30 00:25:26 +03:00
Azat Khuzhin
09b6201304
test/ssl: fix bufferevent_getfd() for bufferevent_openssl_filter_new()
2017-01-19 20:53:05 +03:00
Azat Khuzhin
d047c2412e
test/ssl: cover case when we writing to be_openssl after connecting
...
Right now it fails because of regression for filtered openssl
bufferevent, and by it I mean ssl/bufferevent_filter_write_after_connect
test, and by fails - hang.
Regression-for: da52933550fd4736aa1c213b6de497e2ffc31e34 ("be_openssl:
don't call do_write() directly from outbuf_cb")
2017-01-19 20:53:05 +03:00
Azat Khuzhin
532a47ce1e
test: fix building under openssl 1.1 (init functions has been deprecated)
...
Refs: #397
2016-12-07 01:14:16 +03:00
Azat Khuzhin
336f3b11e5
Fix _FILE_OFFSET_BITS redinition (solaris/autotools)
...
So firstly include our header (config.h) -- <evconfig-private.h>, and
only after it <sys/types.h> since latest has #ifdef guard, while our
config.h is not inteded for this.
And besides all this thing with LARGE_FILE is a abit awkward, since we
don't nefine _LP64/_LP32 anyway, and so we have next error actually (64bit VS
32bit):
==> solaris: In file included from ./util-internal.h:30:0,
==> solaris: from test/regress_ssl.c:49:
==> solaris: ./evconfig-private.h:29:0: warning: "_FILE_OFFSET_BITS" redefined
==> solaris: #define _FILE_OFFSET_BITS 64
==> solaris: ^
==> solaris: In file included from /usr/include/sys/types.h:17:0,
==> solaris: from test/regress_ssl.c:38:
==> solaris: /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0: note: this is the location of the previous definition
==> solaris: #define _FILE_OFFSET_BITS 32
==> solaris: ^
For cmake it commented in: 8b228e27f57300be61b57a41a2ec8666b726dc34
("Lot's of cmake updates")
2016-12-06 13:21:28 +03:00
Kurt Roeckx
3e9e0a0d46
Make it build using OpenSSL 1.1.0
...
Rebased (azat):
- tabs instead of whitespaces
- make openssl-compat.h safe for complex expressions
- do not call sk_SSL_COMP_free() in 1.1 (fixes double free)
TODO:
- clean methods_bufferevent
Closes : #397 (cherry-picked)
2016-10-16 19:05:24 +03:00
Adam Langley
f9803a6943
Switch from a 512 to 2048-bit RSA key.
...
The 512 bit key is too small to sign larger hashes. This can cause the
regression tests to fail depending on the defaults in libssl.
2016-10-13 16:12:07 -07:00
Azat Khuzhin
a9e8cd6738
test/ssl: use send()/recv()/EVUTIL_ERR_RW_RETRIABLE()/EVUTIL_SOCKET_ERROR() to fix win32
...
Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.5.107/job/k70our1xdp0ym4dm#L1906
Fixes: ssl/bufferevent_connect_sleep
2016-08-09 15:47:58 +03:00
Trond Norbye
73d0360e83
test/regress_ssl: Fix compile problems for win32
...
Windows doesn't have unistd.h, but have the required
functionality in io.h.
azat: use ev_ssize_t instead of ssize_t
2016-02-15 23:29:10 +03:00
Azat Khuzhin
da0ea7ae77
test/ssl: cover busy-loop (i.e. {read,write}-blocked-on-{write,read} stuff)
...
This covers SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE error codes from ssl,
under which we must block read/write to avoid busy looping, and hence extra CPU
usage.
This test introduces custom BIO that will count read/write and validates
counters, with patches for be_openssl that drops handling
SSL/SSL_ERROR_WANT_READ there are more then 43K reads, so 100 is pretty ok.
2015-11-18 15:40:47 +03:00
Azat Khuzhin
0c4c387c15
test/ssl: export getkey()/getcert()/get_ssl_ctx()/init_ssl() for https
2015-11-05 11:00:06 +03:00
Thomas Bernard
9f02a44513
make test/regress_ssl.c compile without warnings
2015-10-05 12:37:41 +02:00
Azat Khuzhin
cdafdf017e
test/regress_ssl: check events fd/pending after timeout triggered
...
In this case client can't connect to server, and this bring to the front some
bugs with assigning on already added events (because of ```fd_is_set``` stuff),
for more info see #258 , since this is the reproducible for it.
2015-09-02 19:15:27 +03:00
Azat Khuzhin
74845f1198
test/regress_ssl: cover case when server didn't up (failed with timeout)
2015-09-02 19:08:36 +03:00
Azat Khuzhin
df507afafd
test/regress_ssl: covert that we can't change fd with underlying
2015-09-02 19:07:08 +03:00
Azat Khuzhin
762edb46a8
test/regress_ssl: cover that events (read/write) at finish not pending
2015-09-02 19:06:45 +03:00
Azat Khuzhin
b78a829752
test/regress_ssl: cover fd manipulations
2015-09-02 19:04:52 +03:00
Azat Khuzhin
46bba73103
test/regress_ssl: convert open_ssl_bufevs() to mask
2015-09-02 19:04:45 +03:00
Azat Khuzhin
34559913c0
test/regress_ssl: convert client/server to mask too
2015-09-02 19:04:39 +03:00
Azat Khuzhin
0430327364
test/regress_ssl: cover "allow_dirty_shutdown"
2015-09-02 19:04:11 +03:00
Azat Khuzhin
342e116ff6
test/regress_ssl: convert regress_bufferevent_openssl() to bitmask
2015-09-02 19:04:11 +03:00
Azat Khuzhin
25e56fdbc1
tests/regress_ssl: drop duplicated assert
2015-09-01 20:40:03 +03:00
Nick Mathewson
89c1a3b7fe
Fix several memory leaks in the unit tests.
...
Also add a comment to buffer.c about why we call
evbuffer_file_segment_free on failure to add the segment.
2014-09-18 12:40:38 -04:00
Joakim Soderberg
e212c5486d
Check for OSX when checking for clang.
2014-01-22 13:19:49 +01:00
Joakim Soderberg
0ef1d04e44
Get rid of unknown pragma warnings.
2013-12-17 14:32:07 +01:00
Joakim Söderberg
69c3516be6
Get rid of deprecation warnings for OpenSSL on OSX 10.7+
2013-12-17 13:28:23 +01:00
Nick Mathewson
5a9a014189
Fix a couple of compile warnings in the unit tests
2012-11-16 16:17:07 -05:00
Nick Mathewson
1f5a48d1d0
Merge remote-tracking branch 'origin/patches-2.0'
2012-11-15 11:45:12 -05:00
Nick Mathewson
ac009f9245
Warn when openssl version in unit test mismatches compiled version.
2012-11-15 11:43:45 -05:00
Nick Mathewson
c2f30863e2
Fix renegotiation test to work around openssl 1.0.1 bug
...
There's a bug in openssl 1.0.1 where TLS1.1 and TLS1.2 can't
renegotiate with themselves. When testing renegotiation with OpenSSL
>=1.0.1 and <1.0.1d, disable those protocols.
2012-11-15 11:43:45 -05:00
Nick Mathewson
2e6a985003
Merge remote-tracking branch 'github/20_win64_compilation' into 21_win64_compilation
...
Conflicts:
event.c
http.c
sample/event-read-fifo.c
test/regress_bufferevent.c
2012-11-01 18:12:07 -04:00
Nick Mathewson
94866c2763
Compile without warnings on mingw64
...
This is mostly a matter of catching cases where we were still
assuming that evutil_socket_t could be used as an int.
2012-11-01 17:56:06 -04:00
Nick Mathewson
9852107f37
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
buffer.c
http.c
2012-07-26 10:43:13 -04:00
Nick Mathewson
a2006c0087
Move assignment outside tt_assert in ssl unit tests. Appeases coverity.
2012-07-26 10:37:47 -04:00
Nick Mathewson
539466e568
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
Makefile.am
WIN32-Code/event2/event-config.h
configure.in
2012-02-10 17:33:50 -05:00
Nick Mathewson
e49e289129
Update copyright notices to 2012
2012-02-10 17:29:53 -05:00
Nick Mathewson
0cb70e3333
Merge remote-tracking branch 'origin/patches-2.0'
2011-10-26 10:17:21 -04:00
Nick Mathewson
3c824bd334
Update copyright dates to 2011.
2011-10-24 13:18:09 -04:00
Nick Mathewson
e40bafe796
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
Makefile.am
WIN32-Code/event2/event-config.h
configure.in
test/regress_ssl.c
2011-06-04 21:40:55 -04:00
Nick Mathewson
bdfb8330df
Fix regress_ssl.c build on openbsd
2011-06-03 17:06:17 -04:00
Nick Mathewson
9f560bfa11
Use "_WIN32", not WIN32: it's standard and we don't need to fake it
...
This patch was automatically generated with perl.
Based on a patch by Peter Rosin.
2011-05-25 20:03:15 -04:00
Evan Jones
c0bf63cecb
tests: Use relative includes ("") instead of system includes (<>)
2010-12-03 12:57:15 -05:00
Nick Mathewson
02f6259fc3
New unit test for ssl bufferevents starting with connected SSLs.
2010-10-14 12:17:28 -04:00
Nick Mathewson
34331e456d
The corrected bufferevent filter semantics let us fix our openssl tests
2010-10-14 10:55:04 -04:00
Nick Mathewson
a5ce9ad4af
Make SSL tests cover enabling/disabling EV_READ.
...
I want my 80% coverage.
2010-09-09 16:01:42 -04:00
Nick Mathewson
17efc1cdfa
Update all our copyright notices to say "2010"
2010-03-04 01:38:48 -05:00
Nick Mathewson
e5bbd40ad7
Clean up formatting: use tabs, not 8-spaces, to indent.
2010-02-18 17:44:09 -05:00
Nick Mathewson
d17c720c05
Remove an extraneous puts().
...
svn:r1415
2009-08-14 20:07:01 +00:00
Nick Mathewson
cf54d74a65
More unit tests for Openssl, including initializing with no socket. Up to 75% coverage.
...
svn:r1399
2009-07-30 20:41:41 +00:00
Nick Mathewson
7a2a51a3a1
Add unit tests for SSL session renegotiation.
...
This tickles the write-blocked-on-read code, and in this case turned
up a bug in it.
svn:r1397
2009-07-30 20:41:21 +00:00