summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2017-05-04Add tests for version/ciphersuite sanity checksMatt Caswell
The previous commits added sanity checks for where the max enabled protocol version does not have any configured ciphersuites. We should check that we fail in those circumstances. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3334)
2017-05-04Add a ciphersuite config sanity check for serversMatt Caswell
Ensure that there are ciphersuites enabled for the maximum supported version we will accept in a ClientHello. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3334)
2017-05-04Add a ciphersuite config sanity check for clientsMatt Caswell
Ensure that there are ciphersuites enabled for the maximum supported version we are claiming in the ClientHello. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3334)
2017-03-21Add a test for resumption after HRRMatt Caswell
Make sure we actually test resumption where an HRR has occurred. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2996) (cherry picked from commit 1763ab10291eec361d8e56519582d710158e1e8e)
2017-03-16Rename the test_stack recipe file name to be consistent with the rest of thePauli
tests. [skip ci] Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2964)
2017-03-15Unit tests for crypto/stack.Pauli
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2924)
2017-03-15test/recipes/03-test_internal_*: call setup() first.Andy Polyakov
Strawberry Perl bailed out running test\run_tests.pl insisting on setup() being called explicitly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-15Add Python Cryptography.io external test suiteJon Spillett
Add python cryptography testing instructions too Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2885)
2017-03-15Add additional RSA-PSS and RSA-OAEP tests.Dr. Stephen Henson
Import test data from: ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip This is a set of RSA-PSS and RSA-OAEP test vectors including some edge cases with unusual key sizes. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2944)
2017-03-14Re-enable some BoringSSL testsMatt Caswell
The previous 2 commits fixed some issues in the Boring tests. This re-enables those tests. [extended tests] Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2942)
2017-03-14SSL_get_peer_cert_chain() does not work after a resumptionMatt Caswell
After a resumption it is documented that SSL_get_peer_cert_chain() will return NULL. In BoringSSL it still returns the chain. We don't support that so we should update the shim to call SSL_get_peer_certificate() instead when checking whether a peer certificate is available. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2942)
2017-03-14Ensure we set the session id context in ossl_shimMatt Caswell
OpenSSL requires that we set the session id context. BoringSSL apparently does not require this, so wasn't setting it. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2942)
2017-03-14Add test for -nameout outputRich Salz
Using a cert with Cyrillic characters, kindly supplied by Dmitry Belyavsky Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2943)
2017-03-14Fix some -Wshadow warningsBenjamin Kaduk
Found using various (old-ish) versions of gcc. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2940)
2017-03-14Rather use -out parameter than redirect stdoutRichard Levitte
On some platforms, setting stdout to binary mode isn't quite enough, which makes the result unusable. With -out, we have better control. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2939)
2017-03-14Fix 12 Boring tests involving NULL-SHA ciphersuitesMatt Caswell
The Boring runner attempts to enable the NULL-SHA ciphersuite using the cipherstring "DEFAULT:NULL-SHA". However in OpenSSL DEFAULT permanently switches off NULL ciphersuites, so we fix this up to be "ALL:NULL-SHA" instead. We can't change the runner so we have to change the shim to detect this. (Merged from https://github.com/openssl/openssl/pull/2933) Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2017-03-14Port remaining old DTLS testsEmilia Kasper
We already test DTLS protocol versions. For good measure, add some DTLS tests with client auth to the new test framework, so that we can remove the old tests without losing coverage. Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-14Port SRP tests to the new test frameworkEmilia Kasper
Also add negative tests for password mismatch. Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-14Update ossl_config.json for later BoringSSL commitMatt Caswell
Update the list of suppressions so that we can run a later BoringSSL set of tests. This also adds an ErrorMap to greatly reduce the number of failing tests. The remaining tests that still fail are just disabled for now. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2930)
2017-03-14Make the Boring tests passMatt Caswell
The boring tests are currently failing because they send a PSK extension which isn't in the last place. This is not allowed in the latest TLS1.3 specs. However the Boring tests we have are based on an old commit that pre-date when that rule first appeared. The proper solution is to update the tests to a later commit. But for now to get travis to go green we disable the failing tests. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2928)
2017-03-13Added a test case for RSA_padding_add_PKCS1_PSS_mgf1.Bernd Edlinger
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2801)
2017-03-10Encourage having external tests in multiple test recipesRichard Levitte
This will make the individual external tests more easily selectable / deselectable through the usual test selection mechanism. This also moves external tests to group 95. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2902)
2017-03-10Split test/recipes/03_test_internal.t into individual testsRichard Levitte
This allows a finer granularity when selecting which tests to run, and makes the tests more vidible. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2901)
2017-03-10Add a test to check that if a PSK extension is not last then we failMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2896)
2017-03-10Make it possible to select or deselect test groups by numberRichard Levitte
Examples of possible expressions (adapt to your platform): make test TESTS=-99 make test TESTS=10 make test TESTS=-9? make test TESTS=-[89]0 make test TESTS=[89]0 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2887)
2017-03-08Limit the output of the enc -ciphers command to just the ciphers enc canPauli
process. This means no AEAD ciphers and no XTS mode. Update the test script that uses this output to test cipher suites to not filter out the now missing cipher modes. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2876)
2017-03-08Fix no-compMatt Caswell
The value of SSL3_RT_MAX_ENCRYPTED_LENGTH normally includes the compression overhead (even if no compression is negotiated for a connection). Except in a build where no-comp is used the value of SSL3_RT_MAX_ENCRYPTED_LENGTH does not include the compression overhead. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2872)
2017-03-07Fix the number of tests to skip if TLSv1.3 is disabledMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2875)
2017-03-07Add a test for records not on the record boundaryMatt Caswell
Test that we check that key change messages appear on a record boundary. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2875)
2017-03-07test: add chacha_internal_test.Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-06Add a test to check that we correctly handle record overflowsMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2861)
2017-03-06Fix an endless loop in rsa_builtin_keygen.Rich Salz
And add a test case. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2757)
2017-03-06Fix no-ecMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2858)
2017-03-06Fix a test failure with no-tls1_1Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2857)
2017-03-04Add a test for TLSv1.3 cookiesMatt Caswell
We just check that if we insert a cookie into an HRR it gets echoed back in the subsequent ClientHello. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2839)
2017-03-03Update and add testDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2840)
2017-03-03Reset executable bits on files where not needed.Bernd Edlinger
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2835)
2017-03-02Update early data API for writing to unauthenticated clientsMatt Caswell
Change the early data API so that the server must use SSL_write_early_data() to write to an unauthenticated client. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2737)
2017-03-02Rename SSL_write_early() to SSL_write_early_data()Matt Caswell
This is for consistency with the rest of the API where all the functions are called *early_data*. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2737)
2017-03-02Rename SSL_read_early() to SSL_read_early_data()Matt Caswell
This is for consistency with the rest of the API where all the functions are called *early_data*. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2737)
2017-03-02Add early_data testsMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2737)
2017-03-02Implement the early data changes required in tls13_change_cipher_state()Matt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2737)
2017-03-02-precert doesn't work when configured no-ct, don't try to test it thenRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2827)
2017-03-02Fix the skip numbers in 80-test_ca.tRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2827)
2017-03-02Use the built in boolean type for CompressionExpectedMatt Caswell
Don't create a custom boolean type for parsing CompressionExpected. Use the existing one instead. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2814)
2017-03-02Add compression testsMatt Caswell
Check whether we negotiate compression in various scenarios. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2814)
2017-03-01Remove some obsolete/obscure internal define switches:Emilia Kasper
- FLAT_INC - PKCS1_CHECK (the SSL_OP_PKCS1_CHECK options have been no-oped) - PKCS_TESTVECT (debugging leftovers) - SSL_AD_MISSING_SRP_USERNAME (unfinished feature) - DTLS_AD_MISSING_HANDSHAKE_MESSAGE (unfinished feature) - USE_OBJ_MAC (note this removes a define from the public header but very unlikely someone would be depending on it) - SSL_FORBID_ENULL Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
2017-02-28Add AGL's "beer mug" PEM file as another test inputBenjamin Kaduk
AGL has a history of pointing out the idiosynchronies/laxness of the openssl PEM parser in amusing ways. If we want this functionality to stay present, we should test that it works. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2756)
2017-02-28Add test corpus for PEM readingBenjamin Kaduk
Generate a fresh certificate and DSA private key in their respective PEM files. Modify the resulting ASCII in various ways so as to produce input files that might be generated by non-openssl programs (openssl always generates "standard" PEM files, with base64 data in 64-character lines except for a possible shorter last line). Exercise various combinations of line lengths, leading/trailing whitespace, non-base64 characters, comments, and padding, for both unencrypted and encrypted files. (We do not have any other test coverage that uses encrypted files, as far as I can see, and the parser enforces different rules for the body of encrypted files.) Add a recipe to parse these test files and verify that they contain the expected string or are rejected, according to the expected status. Some of the current behavior is perhaps suboptimal and could be revisited. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2756)
2017-02-28Exdata test was never enabled.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2787)