summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2016-08-16two typo fixesFdaSilvaYY
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1461)
2016-08-16test/ssl_test.tmpl: make it work with elderly perl.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-16SSL tests: send some application dataEmilia Kasper
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-15Remove a stray unneeded line in 70-test_sslrecords.tMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-08-15Add some SSLv2 ClientHello testsMatt Caswell
Test that we handle a TLS ClientHello in an SSLv2 record correctly. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-08-15Improves CTLOG_STORE settersRob Percival
Changes them to have clearer ownership semantics, as suggested in https://github.com/openssl/openssl/pull/1372#discussion_r73232196. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1408)
2016-08-15Skip the SRP tests in 80-test_ssl_old.t if no TLS versions is enabledRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-13Update X25519 key format in evptests.txtDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-12Check for bad filename in evp_testRich Salz
Thanks to Brian Carpter for reporting this. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-08-10Don't attempt to load the CT log list with no-ecEmilia Kasper
In practice, CT isn't really functional without EC anyway, as most logs use EC keys. So, skip loading the log list with no-ec, and skip CT tests completely in that conf. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-10Change callers to use the new constants.Rich Salz
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1429)
2016-08-10Gracefully free a NULL HANDSHAKE_RESULTEmilia Kasper
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-10Add TEST_checkEmilia Kasper
Like OPENSSL_assert, but also prints the error stack before exiting. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-10SSL tests: port CT tests, add a few moreEmilia Kasper
This commit only ports existing tests, and adds some coverage for resumption. We don't appear to have any handshake tests that cover SCT validation success, and this commit doesn't change that. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-10SSL test ctx: fix testsEmilia Kasper
Some failure tests were failing for the wrong reason after the CTX refactoring. Update those tests. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-10Kill PACKET_starts() from bad_dtls_testDavid Woodhouse
As discussed in PR#1409 it can be done differently. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-10Fix clienthellotest to use PACKET functionsDavid Woodhouse
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-08NPN and ALPN: test resumptionEmilia Kasper
In NPN and ALPN, the protocol is renegotiated upon resumption. Test that resumption picks up changes to the extension. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-08Fix ALPN tests when NPN is offEmilia Kasper
OPENSSL_NO_NEXTPROTONEG only disables NPN, not ALPN Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-08Reorganize SSL test structuresEmilia Kasper
Move custom server and client options from the test dictionary to an "extra" section of each server/client. Rename test expectations to say "Expected". This is a big but straightforward change. Primarily, this allows us to specify multiple server and client contexts without redefining the custom options for each of them. For example, instead of "ServerNPNProtocols", "Server2NPNProtocols", "ResumeServerNPNProtocols", we now have, "NPNProtocols". This simplifies writing resumption and SNI tests. The first application will be resumption tests for NPN and ALPN. Regrouping the options also makes it clearer which options apply to the server, which apply to the client, which configure the test, and which are test expectations. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-05spelling fixes, just comments and readme.klemens
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1413)
2016-08-05Move the building of test/buildtest_*. to be done unconditionallyRichard Levitte
These were guarded by $disabled{tests}. However, 'tests' is disabled if we configure 'no-stdio', which means that we don't detect the lack of OPENSSL_NO_STDIO guards in our public header files. So we move the generation and build of test/buildtest_*.c to be unconditional. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-05VMS: Fix building of bad_dtls_testRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-08-04Add basic test for Cisco DTLS1_BAD_VER and record replay handlingDavid Woodhouse
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-0280-test_ssl_new.t: only skip on $no_tls if no other skip conditions definedRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-02In 80-test_ssl_new, more "plan tests" to a more useful positionRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-02Fix tests for no-nextprotonegMatt Caswell
Fix the 80-test_ssl_test_ctx and 80-test_ssl_new tests when used with the no-nextprotoneg option Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-01Fix various no-*s.Ben Laurie
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-31test/smcont.txt: trigger assertion in bio_enc.c.Andy Polyakov
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-07-30Fix bogus warningsMatt Caswell
Fix some bogus "may be used uninitialized" warnings on some compilers. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-29Simplify and rename SSL_set_rbio() and SSL_set_wbio()Matt Caswell
SSL_set_rbio() and SSL_set_wbio() are new functions in 1.1.0 and really should be called SSL_set0_rbio() and SSL_set0_wbio(). The old implementation was not consistent with what "set0" means though as there were special cases around what happens if the rbio and wbio are the same. We were only ever taking one reference on the BIO, and checking everywhere whether the rbio and wbio are the same so as not to double free. A better approach is to rename the functions to SSL_set0_rbio() and SSL_set0_wbio(). If an existing BIO is present it is *always* freed regardless of whether the rbio and wbio are the same or not. It is therefore the callers responsibility to ensure that a reference is taken for *each* usage, i.e. one for the rbio and one for the wbio. The legacy function SSL_set_bio() takes both the rbio and wbio in one go and sets them both. We can wrap up the old behaviour in the implementation of that function, i.e. previously if the rbio and wbio are the same in the call to this function then the caller only needed to ensure one reference was passed. This behaviour is retained by internally upping the ref count. This commit was inspired by BoringSSL commit f715c423224. RT#4572 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-29Add some SSL BIO testsMatt Caswell
This adds some simple SSL BIO tests that check for pushing and popping of BIOs into the chain. These tests would have caught the bugs fixed in the previous three commits, if combined with a crypto-mdebug build. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-29Add a test for SSL_set_bio()Matt Caswell
The SSL_set_bio() function has some complicated ownership rules. This adds a test to make sure it all works as expected. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25Fix no-tls1_2Matt Caswell
Misc fixes impacting no-tls1_2. Also fixes no-dtls1_2. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25Fix no-dtls*Matt Caswell
Also fixes some other options like no-dgram and no-sock. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-25Fix no-ctMatt Caswell
Ensure that we don't build/run the ct fuzzing code if no-ct is used. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-22SSL tests: compress generated output a littleEmilia Kasper
Don't emit duplicate server/client sections when they are identical. Instead, just point to the same section. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-22Make boolean SSL test conf values case-insensitiveEmilia Kasper
Undo review mistake: I changed the wrong strcmp in a previous pull request. Add test. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-21Test client-side resumptionEmilia Kasper
Add tests for resuming with a different client version. This happens in reality when clients persist sessions on disk through upgrades. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-20SSL test framework: port resumption testsEmilia Kasper
Systematically test every server-side version downgrade or upgrade. Client version upgrade or downgrade could be tested analogously but will be done in a later change. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-07-20Fix a few if(, for(, while( inside code.FdaSilvaYY
Fix some indentation at the same time Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1292)
2016-07-20Use more X509_REQ_get0_pubkey & X509_get0_pubkeyFdaSilvaYY
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1284)
2016-07-19Fix building with no-cmsMatt Caswell
The new fuzzing code broke no-cms Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-07-19SSL test framework: port NPN and ALPN testsEmilia Kasper
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-19Add more session testsMatt Caswell
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-18Use _NO_INST in some build.info filesRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-07-18Fix client auth test_ssl_new failures when enabling/disabling protocolsMatt Caswell
If configuring for anything other than the default TLS protocols then test failures were occuring. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-07-18Fix SSLv3 ClientAuth alert checkingMatt Caswell
In TLS during ClientAuth if the CA is not recognised you should get an UnknownCA alert. In SSLv3 this does not exist and you should get a BadCertificate alert. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-07-18Fix Client Auth testsMatt Caswell
The Client Auth tests were not correctly setting the Protocol, so that this aspect had no effect. It was testing the same thing lots of times for TLSv1.2 every time. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-07-15check return values for EVP_Digest*() APIsDr. Stephen Henson
Reviewed-by: Richard Levitte <levitte@openssl.org>