summaryrefslogtreecommitdiffstats
path: root/test/asynciotest.c
AgeCommit message (Collapse)Author
2017-04-24Adapt all test programsRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3243)
2017-04-11Convert asynciotest for the new test frameworkMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3182)
2017-02-23Let test handshakes stop on certain errorsBenjamin Kaduk
Certain callback APIs allow the callback to request async processing by trickling a particular error value up the stack to the application as an error return from the handshake function. In those cases, SSL_want() returns a code specific to the type of async processing needed. The create_ssl_connection() helper function for the tests is very helpful for several things, including creating API tests. However, it does not currently let us test the async processing functionality of these callback interfaces, because the special SSL error codes are treated as generic errors and the helper continues to loop until it reaches its maximum iteration count. Add a new parameter, 'want', that indicates an expected/desired special SSL error code, so that the helper will terminate when either side reports that error, giving control back to the calling function and allowing the test to proceed. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2279)
2017-01-25Fix some extra or missing whitespaces...FdaSilvaYY
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1618)
2016-11-23Fix an uninit variable usageMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-23Fix the tests following the state machine changes for TLSv1.3Matt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-21Make SSL_read and SSL_write return the old behaviour and document it.Kurt Roeckx
This reverts commit 4880672a9b41a09a0984b55e219f02a2de7ab75e. Fixes: #1903 Reviewed-by: Matt Caswell <matt@openssl.org> GH: #1931
2016-10-28Add a test for BIO_read() returning 0 in SSL_read() (and also for write)Matt Caswell
A BIO_read() 0 return indicates that a failure occurred that may be retryable. An SSL_read() 0 return indicates a non-retryable failure. Check that if BIO_read() returns 0, SSL_read() returns <0. Same for SSL_write(). The asyncio test filter BIO already returns 0 on a retryable failure so we build on that. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-19Split create_ssl_connection()Matt Caswell
Split the create_ssl_connection() helper function into two steps: one to create the SSL objects, and one to actually create the connection. This provides the ability to make changes to the SSL object before the connection is actually made. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-13Add some session API testsMatt Caswell
This commit adds some session API tests, and in particular tests the modified behaviour of SSL_set_session() introduced in the last commit. To do this I have factored out some common code from the asynciotest into a new ssltestlib.c file. I've also renamed getsettest to sslapitest as this more closely matches what it now is! Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-20Add an async io testMatt Caswell
This adds an async IO test. There are two test runs. The first one does a normal handshake with lots of async IO events. The second one does the same but this time breaks up all the written records into multiple records of one byte in length. We do this all the way up until the CCS. Reviewed-by: Andy Polyakov <appro@openssl.org>