aboutsummaryrefslogtreecommitdiff
path: root/test/ssltestlib.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-26Fix some mem leaks in sslapitestMatt Caswell1-1/+1
A mem leak could occur on an error path. Also the mempacket BIO_METHOD needs to be cleaned up, because of the newly added DTLS test. Also fixed a double semi-colon in ssltestlib.c Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-22ssltestlib: Tell compiler we don't care about the value when we don'tRichard Levitte1-1/+1
In mempacket_test_read(), we've already fetched the top value of the stack, so when we shift the stack, we don't care for the value. The compiler needs to be told, or it will complain harshly when we tell it to be picky. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-19MEMPACKET is typedef'd in ssltestlib.h, don't do so again in ssltestlib.cRichard Levitte1-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-19Fix some clang warningsMatt Caswell1-2/+0
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>
2016-08-19Split create_ssl_connection()Matt Caswell1-24/+31
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-08-19Add a DTLS packet mem BIOMatt Caswell1-0/+296
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>
2016-08-19Add a (D)TLS dumper BIOMatt Caswell1-0/+219
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>
2016-07-19Add more session testsMatt Caswell1-14/+27
Add some more tests for sessions following on from the previous commit to ensure the callbacks are called when appropriate. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-07-01Use the SSL_METHODs passed to create_ssl_ctx_pair()Matt Caswell1-2/+2
Don't use hardcoded SSL_METHODs! Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-06-13Add some session API testsMatt Caswell1-0/+145
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>