aboutsummaryrefslogtreecommitdiffstats
path: root/test/ssltestlib.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearMatt Caswell2018-03-201-1/+1
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5689)
* Enhance ssltestlib's create_ssl_ctx_pair to take min and max proto versionRichard Levitte2018-03-191-0/+1
| | | | | | | | | Have all test programs using that function specify those versions. Additionally, have the remaining test programs that use SSL_CTX_new directly specify at least the maximum protocol version. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5663)
* Add some tests for the new TLSv1.3 PSK codeMatt Caswell2017-06-211-0/+1
| | | | | Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3670)
* Let test handshakes stop on certain errorsBenjamin Kaduk2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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)
* Fix some clang warningsMatt Caswell2016-08-191-0/+4
| | | | | | | | Clang was complaining about some unused functions. Moving the stack declaration to the header seems to sort it. Also the certstatus variable in dtlstest needed to be declared static. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Split create_ssl_connection()Matt Caswell2016-08-191-2/+3
| | | | | | | | | 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>
* Add a DTLS packet mem BIOMatt Caswell2016-08-191-0/+10
| | | | | | | | This adds a BIO similar to a normal mem BIO but with datagram awareness. It also has the capability to inject additional packets at arbitrary locations into the BIO, for testing purposes. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add a (D)TLS dumper BIOMatt Caswell2016-08-191-0/+4
| | | | | | | Dump out the records passed over the BIO. Only works for DTLS at the moment but could easily be extended to TLS. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add some session API testsMatt Caswell2016-06-131-0/+21
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>