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
Nick Mathewson
eecefc50e7
Add a function to extract the SSL object from a bufferevent_openssl.
...
svn:r1395
2009-07-30 20:41:00 +00:00
Nick Mathewson
709c21c48c
Bufferevent support for openssl.
...
This code adds a new Bufferevent type that is only compiled when the
openssl library is present. It supports using an SSL object and an
event alert mechanism, which can either be an fd or an underlying
bufferevent.
There is still more work to do: the unit tests are incomplete, and we
need to support flush and shutdown much better. Sometimes events are
generated needlessly: this will hose performance.
There's a new encrypting proxy in sample/le-proxy.c.
This code has only been tested on OSX, and nowhere else.
svn:r1382
2009-07-28 04:03:57 +00:00