test/regress_ssl.c


Log

Author Commit Date CI Message
Bernard Spil 894ca48a 2018-04-02T13:18:27 Fix build with LibreSSL 2.7 LibreSSL 2.7 implements OpenSSL 1.1 API except for BIO_get_init() See also: https://bugs.freebsd.org/226900 Signed-off-by: Bernard Spil <brnrd@FreeBSD.org> Closes: #617 (cherry-pick) (cherry picked from commit 28b8075400c70b2d2da2ce07e590c2ec6d11783d)
Azat Khuzhin 01bc36c1 2017-11-22T10:33:15 Add missing includes into openssl-compat.h Before it depends from the caller #include appropriate headers (at least for OPENSSL_VERSION_NUMBER), but let's make it independent. Fixes: #574 (cherry picked from commit c2c08e0203da93938fe35234fa3a1be4d1c3c2e1)
Jan Beich 230af9f0 2017-01-28T16:42:13 Unbreak build with LibreSSL after openssl 1.1 support added Fixes: 3e9e0a0d46e4 ("Make it build using OpenSSL 1.1.0") Fixes: #445 (cherry picked from commit d057c45e8f48aa90d8b340cac4c8ae4cc8b5d0ac)
Azat Khuzhin 09b62013 2016-12-08T02:11:22 test/ssl: fix bufferevent_getfd() for bufferevent_openssl_filter_new()
Azat Khuzhin d047c241 2016-12-02T18:32:03 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")
Azat Khuzhin 532a47ce 2016-11-14T02:17:51 test: fix building under openssl 1.1 (init functions has been deprecated) Refs: #397
Azat Khuzhin 336f3b11 2016-12-06T13:15:27 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")
Kurt Roeckx 3e9e0a0d 2016-09-19T22:05:15 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)
Adam Langley f9803a69 2016-10-12T17:49:10 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.
Azat Khuzhin a9e8cd67 2016-08-09T12:25:11 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
Trond Norbye 73d0360e 2016-02-15T18:01:36 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
Azat Khuzhin da0ea7ae 2015-11-18T02:50:25 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.
Azat Khuzhin 0c4c387c 2015-11-05T10:34:18 test/ssl: export getkey()/getcert()/get_ssl_ctx()/init_ssl() for https
Thomas Bernard 9f02a445 2015-10-05T12:37:41 make test/regress_ssl.c compile without warnings
Azat Khuzhin cdafdf01 2015-09-02T17:49:41 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.
Azat Khuzhin 74845f11 2015-09-02T17:36:20 test/regress_ssl: cover case when server didn't up (failed with timeout)
Azat Khuzhin df507afa 2015-09-02T17:17:43 test/regress_ssl: covert that we can't change fd with underlying
Azat Khuzhin 762edb46 2015-09-02T17:06:51 test/regress_ssl: cover that events (read/write) at finish not pending
Azat Khuzhin b78a8297 2015-09-02T12:35:51 test/regress_ssl: cover fd manipulations
Azat Khuzhin 46bba731 2015-09-02T12:31:15 test/regress_ssl: convert open_ssl_bufevs() to mask
Azat Khuzhin 34559913 2015-09-02T12:26:40 test/regress_ssl: convert client/server to mask too
Azat Khuzhin 04303273 2015-09-02T11:34:13 test/regress_ssl: cover "allow_dirty_shutdown"
Azat Khuzhin 342e116f 2015-09-02T11:22:43 test/regress_ssl: convert regress_bufferevent_openssl() to bitmask
Azat Khuzhin 25e56fdb 2015-08-25T17:01:42 tests/regress_ssl: drop duplicated assert
Nick Mathewson 89c1a3b7 2014-09-18T12:40:38 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.
Joakim Soderberg e212c548 2014-01-22T13:19:49 Check for OSX when checking for clang.
Joakim Soderberg 0ef1d04e 2013-12-17T14:32:07 Get rid of unknown pragma warnings.
Joakim Söderberg 69c3516b 2013-12-17T13:28:23 Get rid of deprecation warnings for OpenSSL on OSX 10.7+
Nick Mathewson f38e0788 2012-11-18T01:36:03 Make ssl version check in unit tests work
Nick Mathewson 5a9a0141 2012-11-16T16:17:07 Fix a couple of compile warnings in the unit tests
Nick Mathewson 1f5a48d1 2012-11-15T11:45:12 Merge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson ac009f92 2012-11-15T11:43:20 Warn when openssl version in unit test mismatches compiled version.
Nick Mathewson c2f30863 2012-11-15T11:42:14 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.
Nick Mathewson 2e6a9850 2012-11-01T18:12:07 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
Nick Mathewson 94866c27 2012-11-01T17:38:34 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.
Nick Mathewson 9852107f 2012-07-26T10:43:13 Merge remote-tracking branch 'origin/patches-2.0' Conflicts: buffer.c http.c
Nick Mathewson a2006c00 2012-07-26T10:37:47 Move assignment outside tt_assert in ssl unit tests. Appeases coverity.
Nick Mathewson 539466e5 2012-02-10T17:33:50 Merge remote-tracking branch 'origin/patches-2.0' Conflicts: Makefile.am WIN32-Code/event2/event-config.h configure.in
Nick Mathewson e49e2891 2012-02-10T17:29:53 Update copyright notices to 2012
Nick Mathewson 0cb70e33 2011-10-26T10:17:21 Merge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson 3c824bd3 2011-10-24T13:18:09 Update copyright dates to 2011.
Nick Mathewson e40bafe7 2011-06-04T21:40:55 Merge remote-tracking branch 'origin/patches-2.0' Conflicts: Makefile.am WIN32-Code/event2/event-config.h configure.in test/regress_ssl.c
Nick Mathewson bdfb8330 2011-06-03T17:06:17 Fix regress_ssl.c build on openbsd
Nick Mathewson 9f560bfa 2011-05-25T19:50:56 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.
Evan Jones c0bf63ce 2010-12-02T14:13:33 tests: Use relative includes ("") instead of system includes (<>)
Nick Mathewson 02f6259f 2010-10-14T11:44:32 New unit test for ssl bufferevents starting with connected SSLs.
Nick Mathewson 34331e45 2010-10-08T01:09:02 The corrected bufferevent filter semantics let us fix our openssl tests
Nick Mathewson a5ce9ad4 2010-09-09T16:01:42 Make SSL tests cover enabling/disabling EV_READ. I want my 80% coverage.
Nick Mathewson 17efc1cd 2010-03-04T01:25:51 Update all our copyright notices to say "2010"
Nick Mathewson e5bbd40a 2010-02-18T17:41:15 Clean up formatting: use tabs, not 8-spaces, to indent.
Nick Mathewson d17c720c 2009-08-14T20:07:01 Remove an extraneous puts(). svn:r1415
Nick Mathewson cf54d74a 2009-07-30T20:41:41 More unit tests for Openssl, including initializing with no socket. Up to 75% coverage. svn:r1399
Nick Mathewson 7a2a51a3 2009-07-30T20:41:21 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
Nick Mathewson eecefc50 2009-07-30T20:41:00 Add a function to extract the SSL object from a bufferevent_openssl. svn:r1395
Nick Mathewson 709c21c4 2009-07-28T04:03:57 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