summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2016-09-19Fix no-ocspRichard Levitte
Some compilers complain about unused variables, and some tests do not run well without OCSP. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 057c676afb2a69b7d2bb9cf6e895e720a2a62b78)
2016-09-14Add a test for 'openssl passwd'Richard Levitte
Also, enlarge test group 20 to include openssl commands that aren't tested otherwise Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 497f3bf9a75a2917e50b16b7985e87c89b86a39b)
2016-09-06Correct detection of group end in map file when testing symbol presenceRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 77a42b5f177e308233ab108806c48b9590a780e2)
2016-09-01Move 05-test_fuzz.t to 90-test_fuzz.tRichard Levitte
This adheres much better to the documentation in test/README Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 377ab6d183453dac5454abf62d5341a559caa264)
2016-09-01Revert "Make it possible to disable fuzz testing"Richard Levitte
This reverts commit eb40eaed727500bf4a15f848c99e37edd18e142e. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit a5e1f1230e09b249ff94cc48aeffd1b874cb937e)
2016-08-31Make it possible to disable fuzz testingRichard Levitte
These tests take a very long time on some platforms, and arent't always strictly necessary. This makes it possible to turn them off. The necessary binaries are still built, though, in case someone still wants to do a manual run. Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit eb40eaed727500bf4a15f848c99e37edd18e142e)
2016-08-30Add some CertStatus testsMatt Caswell
The previous commit revealed a long standing problem where CertStatus processing was broken in DTLS. This would have been revealed by better testing - so add some! Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 767ccc3b77cde82c46ab4af541663f6c80e538d3)
2016-08-25Fix uninit read in sslapitestMatt Caswell
msan detected an uninit read. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-25Windows: UTF-8 opt-in for command-line arguments and console input.Andy Polyakov
User can make Windows openssl.exe to treat command-line arguments and console input as UTF-8 By setting OPENSSL_WIN32_UTF8 environment variable (to any value). This is likely to be required for data interchangeability with other OSes and PKCS#12 containers generated with Windows CryptoAPI. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-24Fix no-ec2mMatt Caswell
The new curves test did not take into account no-ec2m Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-24To avoid SWEET32 attack, move 3DES to weakRich Salz
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-08-2380-test_pkcs12.t: skip the test on Windows with non-Greek locale.Andy Polyakov
Test doesn't work on Windows with non-Greek locale, because of Win32 perl[!] limitation, not OpenSSL. For example it passes on Cygwin and MSYS... Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-23Fix bio_enc_testMatt Caswell
There was a block of code at the start that used the Camellia cipher. The original idea behind this was to fill the buffer with non-zero data so that oversteps can be detected. However this block failed when using no-camellia. This has been replaced with a RAND_bytes() call. I also updated the the CTR test section, since it seems to be using a CBC cipher instead of a CTR cipher. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-08-22Test the support curves in tlsKurt Roeckx
Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1472
2016-08-22Fix no-desMatt Caswell
The PKCS12 command line utility is not available if no-des is used. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-22RT2676: Reject RSA eponent if even or 1Rich Salz
Also, re-organize RSA check to use goto err. Add a test case. Try all checks, not just stopping at first (via Richard Levitte) Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-22Fix a memory leak in EC_GROUP_get_ecparameters()Kazuki Yamaguchi
The variable 'buffer', allocated by EC_POINT_point2buf(), isn't free'd on the success path. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-22Choose a ciphersuite for testing that won't be affected by "no-*" optionsMatt Caswell
The previous ciphersuite broke in no-ec builds. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-22ssltestlib: Tell compiler we don't care about the value when we don'tRichard Levitte
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-22crypto/pkcs12: facilitate accessing data with non-interoperable password.Andy Polyakov
Originally PKCS#12 subroutines treated password strings as ASCII. It worked as long as they were pure ASCII, but if there were some none-ASCII characters result was non-interoperable. But fixing it poses problem accessing data protected with broken password. In order to make asscess to old data possible add retry with old-style password. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-22Add PKCS#12 UTF-8 interoperability test.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-21Add test/bio_enc_test.c.Andy Polyakov
RT#4628 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-19MEMPACKET is typedef'd in ssltestlib.h, don't do so again in ssltestlib.cRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-19Fix some clang warningsMatt Caswell
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-19Add DTLS replay protection testMatt Caswell
Injects a record from epoch 1 during epoch 0 handshake, with a record sequence number in the future, to test that the record replay protection feature works as expected. This is described more fully in the next commit. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-08-19Add a DTLS unprocesed records testMatt Caswell
Add a test to inject a record from the next epoch during the handshake and make sure it doesn't get processed immediately. 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-08-19Add a DTLS packet mem BIOMatt Caswell
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 Caswell
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-08-19Add more details on how to add a new SSL testEmilia Kasper
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-08-18Test that the peers send at most one fatal alertEmilia Kasper
Duplicate alerts have happened, see 70c22888c1648fe8652e77107f3c74bf2212de36 Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-18Port multi-buffer testsEmilia Kasper
Make maximum fragment length configurable and add various fragmentation tests, in addition to the existing multi-buffer tests. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-17Constify char* input parameters in apps codeFdaSilvaYY
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-08-16Convert SSL_SESSION* functions to use const gettersMatt Caswell
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
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>