summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-07-14Update PR#3925tls1.3-draft-18Roelof duToit
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3925)
2017-07-14Retry SSL_read on ERROR_WANT_READ.Roelof duToit
This resolves the retry issue in general, but also the specific case where a TLS 1.3 server sends a post-handshake NewSessionTicket message prior to appdata. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3925)
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-21Fix resumption after HRRMatt Caswell
Commit 6b1bb98fa moved the processing of ClientHello extensions into the state machine post-processing stage. After processing s->init_num is reset to 0, so by post-processing we cannot rely on its value. Unfortunately we were using it to handle the PSK extension. This causes the handshake to fail. We were using init_num to figure out the length of ClientHello2 so we can remove it from the handshake_buffer. The handshake_buffer holds the transcript of all the messages sent so far. For PSK processing though we only want to add in a partial ClientHello2. This commit changes things so we just work out where ClientHello2 starts, working forward from the beginning of handshake_buffer. Fixes #2983 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2996) (cherry picked from commit 77815a026cbedbb7b9a89558612f69e6294fe1ea)
2017-03-16Fix typo in ASYNC_WAIT_CTX_new.pod docPaul Yang
For the function that get the changed fds, it should be 'ASYNC_WAIT_CTX_get_changed_fds()' instead of 'ASYNC_WAIT_CTX_fds_have_changed()'. CLA: trivial Signed-off-by: Paul Yang <paulyang.inf@gmail.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2966)
2017-03-16Simplify code around next_proto.len by changing 'len' data type.FdaSilvaYY
clean an useless static qualifier and a dead comment. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2278)
2017-03-16Remove documentation of deleted functionBenjamin Kaduk
It's even removing a BUGS entry! Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2797)
2017-03-16Remove unused typedefs from indent configBenjamin Kaduk
Some things were not removed from util/indent.pro when they were removed from the code. grep '^-T' util/indent.pro | awk '{print $2} > /tmp/a grep -rF -f /tmp/a --exclude CHANGES --exclude 'INSTALL' --exclude 'LICENSE' --exclude 'NEWS' --exclude 'NOTES*' --exclude 'README*' --exclude indent.pro --exclude-dir corpora -o -h *|sort|uniq>/tmp/b comm -23 <(sort /tmp/a) /tmp/b >/tmp/c grep -v -E '(LHASH_OF|STACK_OF)' /tmp/c > /tmp/d grep -v -Ff /tmp/d util/indent.pro > util/indent.pro Manually adjusted to retain time_t and the ossl_*intmax_t types. Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2797)
2017-03-16Remove some unused PEM structuresBenjamin Kaduk
Reviewed-by: Emilia Käsper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2797)
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-15Fixed a crash in print_notice.Bernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2935)
2017-03-15Remove dead codeBenjamin Kaduk
tls1_get_curvelist() does not read from its third parameter, so the assignments prior to function call were dead code and can be removed. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2952)
2017-03-15Tighten up client status_request processingBenjamin Kaduk
Instead of making a positive comparison against the invalid value that our server would send, make a negative check against the only value that is not an error. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2953)
2017-03-15Forgotten 'make update'Richard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2017-03-15VMS: turning off CALL_DEBUG isn't possible on AlphaRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2962)
2017-03-15Add EC_KEY_get0_engine()Richard Levitte
Just as for DH, DSA and RSA, this gives the engine associated with the key. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2960)
2017-03-15Rewrite the documentation for sk_TYPE_find() and sk_TYPE_find_ex() to betterPauli
describe the vagaries in their behaviour. [skip ci] Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2958)
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-15Fix a hang in tests that use sessionfileMatt Caswell
The logic for testing whether the sessionfile has been created or not was faulty and could result in race conditions. If you "lose" the tests hang waiting for a session file that's never going to arrive. Fixes #2950 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2955)
2017-03-15NOTES.WIN: mention Strawberry Perl as option.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org>
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-15Clear alpn_selected_len for clients, tooBenjamin Kaduk
Zero out the length alongside the NULLing of the pointer, to bring parity between the selected and proposed fields.. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2954)
2017-03-15VMS: don't use /DSF, turn off CALL_DEBUG insteadRichard Levitte
It turns out that /DSF didn't do any good for our purposes. Instead, remove the CALL_DEBUG flag from any image we link. This ensures that we can have debugging information in the image files, but don't automatically end up in a debugging session upon image activation. Unfortunately, this means the CALL_DEBUG must be turned on when there is a need to run with the debugger activated, and to turn it off when done. This has been documented in NOTES.VMS. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2957)
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-14De-obfuscateBenjamin Kaduk
No need to break out of the loop and repeat the loop termination condition when we can just return. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2949)
2017-03-14VMS: throw away [.util]shareable_image_wrap.c.in and add replacement scriptsRichard Levitte
[.util]shareable_image_wrap.c.in was never useful because lib$spawn() insisted on combining stdout and stderr into one. Instead, we introduce two scripts that create and destroy a temporary environment where the local shareable images become available, [.util]local_shlib.com and [.util]unlocal_shlib.com. They also define DBG$IMAGE_DSF_PATH, which is require so the debugger can find the Debug Symbol Files. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2947)
2017-03-14VMS: Change debug linking method to generate a separate Debug Symbol FileRichard Levitte
That makes it possible to run images without automagically ending up in a debug session, while still being able to debug when required. All .DSF files must reside in the same directory to be useful. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2947)
2017-03-14.travis.yml: make git submodule update conditional.Andy Polyakov
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
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-14Update master Travis to TrustyEmilia Kasper
This gets us a newer Clang, and newer Go. 1.1.0 already runs on Trusty without issues. To do this, we need to disable afalgeng in the -Werror build. afalgeng isn't compatible with the -Werror build on Travis Trusty due to kernel header mismatch. (See also 97043e46aa7083c787a1efd72ac31ca97ed41610) Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-03-14Fix a -Wsign-compare warningBenjamin Kaduk
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-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-14Add the presence of ARIA to the change log.Pauli
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2926)
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-13Fix a crash or unbounded allocation in RSA_padding_add_PKCS1_PSS_mgf1Bernd Edlinger
and RSA_verify_PKCS1_PSS_mgf1 with 512-bit RSA vs. sha-512. 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-13Better way to recognise mingw64 in config scriptRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2922)
2017-03-13poly1305/asm/poly1305-x86_64.pl: add poly1305_blocks_vpmadd52_4x.Andy Polyakov
As hinted by its name new subroutine processes 4 input blocks in parallel. It still operates on 256-bit registers and is just another step toward full-blown AVX512IFMA procedure. Reviewed-by: Rich Salz <rsalz@openssl.org>