aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-11-04Removed scoped_types.hMatt Caswell1-28/+0
It is no longer used (replaced with bssl:UniquePtr) Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Remove some flags that are unused in the shimMatt Caswell3-27/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Use the -allow-unimplemented feature of the BoringSSL runnerMatt Caswell2-1/+2
That way we can remove flags that we don't support Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Remove unused BoringSSL specific flagsMatt Caswell4-136/+5
We will rely on the -allow-unimplemented feature instead. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Remove some unreferenced fields from TestStateMatt Caswell1-7/+0
They were there for BoringSSL only features which are not relevant to us. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Remove some #if 0'd out codeMatt Caswell1-9/+0
It was just a sanity check and isn't needed Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Fix argument order in documentationMatt Caswell1-1/+1
git clone has the directory name last Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Remove test/ossl_shim/MakefileMatt Caswell1-9/+0
This Makefile was temporary. Building ossl_shim has now been integrated into to the build system. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Add documentation on the BoringSSL test suite integrationMatt Caswell2-1/+67
Added the file README.external which describes how to build and run OpenSSL to use the BoringSSL test suite. Also updated INSTALL to point to it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Add -std=c++11 to CXXFLAGSMatt Caswell1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Fix some unused variable warnings in ossl_shimMatt Caswell1-2/+0
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Add a comment to 90-test_external.t to explain why we need filter_runMatt Caswell1-6/+9
Also rename executable to cmd...otherwise it breaks! Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Convert 90-test_external.t to using "executable" rather than "system"Richard Levitte1-6/+16
Use the newly added "executable" function rather than "system". Also filter the output to add a prefix to every line so that the "ok" doesn't confuse Test::More Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-11-04Control building of ossl_shim through ConfigureMatt Caswell3-1/+9
Don't build ossl_shim by default. Switch it on through enable-external-tests. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Integrate ossl_shim into the buildRichard Levitte2-0/+12
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-11-04Add a shim config fileMatt Caswell2-1/+1440
This just disables all tests that fail at the moment. Over time we will want to go over these and figure out why they are failing (and fix them if appropriate) Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Add ossl_shim to .gitignoreMatt Caswell1-0/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Rebase shim against latest boringssl codeMatt Caswell10-311/+653
Numerous conflicts resolved. rebase was against commit 490469f850. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Add a test to call the BoringSSL test suiteMatt Caswell1-0/+26
This adds a test to the OpenSSL test suite to invoke the BoringSSL test suite. It assumes you have already compiled the ossl_shim (see previous commit). It also assumes that you have an environment variable BORING_RUNNER_DIR set up to point to the ssl/test/runner directory of a checkout of BoringSSL. This has only been tested with a very old version of BoringSSL (from commit f277add6c) - since that was the last known checkout where the shim compiles successfully. Even with that version of BoringSSL this test will fail. There are lots of Boring tests that are failing for various reasons. Some might be due to bugs in OpenSSL, some might be due to features that BoringSSL has that OpenSSL doesn't, some are due to assumptions about the way BoringSSL behaves that are not true for OpenSSL etc. To get the verbose BoringSSL test output, run like this: VERBOSE=1 BORING_RUNNER_DIR=/path/to/boring/ssl/test/runner make \ TESTS="test_external" test Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Integrate BoringSSL shimMatt Caswell10-0/+2169
The BoringSSL test suite contains numerous tests which OpenSSL does not. The BoringSSL test runner uses a shim to launch the library and execute the tests. This is a version of the BoringSSL shim converted to compile against OpenSSL instead. This is primarily based on the work of David Benjamin from the BoringSSL project who did most of the necessary conversion. It also includes a few other tweaks for opacity changes etc. This is based on a *very* old version of BoringSSL from commit f277add6c. That was the last commit known to work with this patched shim. Later versions may also work but lots of merge conflicts occur when trying to bring it up to date. At the moment this has not been integrated into the build system. There is a very simple standalone makefile in the ossl_shim directory which should be executed directly before tyring to use the shim. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-11-04Don't assume to know the shared library extensionRichard Levitte2-25/+11
test/shlibloadtest.c assumes all Unix style platforms use .so as shared library extension. This is not the case for Mac OS X, which uses .dylib. Instead of this, have the test recipe find out the extension from configuration data. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1844)
2016-11-03Update CRYPTO_set_mem_debug() docRich Salz1-2/+4
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1842)
2016-11-03Enable memory debugging while testingRichard Levitte3-0/+4
Pre 1.1.0, 'make test' would set the environment variable OPENSSL_DEBUG_MEMORY to "on". This got lost when translating the old build files to the new templates. This changes reintroduces that variable. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1840)
2016-11-03test/shlibloadtest: small fixesRichard Levitte1-6/+8
- Make sure to initialise SHLIB variables - Make sure to make local variables static Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1838)
2016-11-03Clang doesn't like -znodelete, make it a linker flag insteadRichard Levitte1-1/+1
gcc is kinder, it silently passes quite a few flags to ld, while clang is stricter and wants them prefixed with -Wl, Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1836)
2016-11-03Clean away remaining 'selftest' codeRichard Levitte5-261/+0
All of these don't compile cleanly any more, probably haven't for quite some time Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Finally, add a test recipe for the internal testsRichard Levitte1-0/+31
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Convert mdc2 test print to internal testRichard Levitte3-21/+102
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Convert x509 selftests to internal testRichard Levitte5-110/+201
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Add a HEADER_MODES_H guard in include/openssl/modes.hRichard Levitte1-6/+11
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Convert modes selftests (cts128 and gcm128) to internal testRichard Levitte4-830/+1096
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Convert asn1 selftests (a_strnid and ameth_lib) into internal testRichard Levitte6-117/+263
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03VMS: ignore multiply defined symbols when linking programsRichard Levitte1-1/+34
The Unix and Windows linkers appear to simply ignore if any symbol is defined multiple times in different object files and libraries. The VMS linker, on the other hand, warns about it, loud and clear. It will still create the executable, but does so screaming. So we complicate things by saving the linker output, look through all the errors and warnings, and if they are only made up of %LINK-W-MULDEF, we let it pass, otherwise we output the linker output and raise the same exit code we got from the linker. Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Explain the deal with internal test programsRichard Levitte1-0/+15
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Allow indented comments in build.infoRichard Levitte1-1/+1
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03Convert poly1305 selftest into internal testRichard Levitte4-506/+1743
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-03test/build.info: typo, $ missingRichard Levitte1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1832)
2016-11-03conf fuzzer: also check for an empty fileKurt Roeckx1-2/+7
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1828
2016-11-02Implement GET_MODULE_HANDLE_EX_FLAG_PIN for windowsMatt Caswell1-8/+43
Rather than leaking a reference, just call GetModuleHandleEx and pin the module on Windows. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Link using -znodeleteMatt Caswell2-13/+18
Instead of deliberately leaking a reference to ourselves, use nodelete which does this more neatly. Only for Linux at the moment. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Add a test to dynamically load and unload the librariesMatt Caswell3-0/+286
This should demonstrate that the atexit() handling is working properly (or at least not crashing) on process exit. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Ensure that libcrypto and libssl do not unload until the process exitsMatt Caswell1-0/+31
Because we use atexit() to cleanup after ourselves, this will cause a problem if we have been dynamically loaded and then unloaded again: the atexit() handler may no longer be there. Most modern atexit() implementations can handle this, however there are still difficulties if libssl gets unloaded before libcrypto, because of the atexit() callback that libcrypto makes to libssl. The most robust solution seems to be to ensure that libcrypto and libssl never unload. This is done by simply deliberately leaking a dlopen() reference to them. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Add a DSO_dsobyaddr() functionMatt Caswell3-3/+32
This works the same way as DSO_pathbyaddr() but instead returns a ptr to the DSO that contains the provided symbol. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Partial revert of 3d8b2ec42 to add back DSO_pathbyaddrMatt Caswell9-1/+102
Commit 3d8b2ec42 removed various unused functions. However now we need to use one of them! This commit resurrects DSO_pathbyaddr(). We're not going to resurrect the Windows version though because what we need to achieve can be done a different way on Windows. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Add a CHANGES entry for the unrecognised record type changeMatt Caswell1-1/+5
Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Add a test for unrecognised record typesMatt Caswell2-3/+51
We should fail if we receive an unrecognised record type Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Fail if an unrecognised record type is receivedMatt Caswell1-7/+5
TLS1.0 and TLS1.1 say you SHOULD ignore unrecognised record types, but TLS 1.2 says you MUST send an unexpected message alert. We swap to the TLS 1.2 behaviour for all protocol versions to prevent issues where no progress is being made and the peer continually sends unrecognised record types, using up resources processing them. Issue reported by 郭志攀 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Test recipes: remove duplicate OpenSSL::Test usageRichard Levitte3-3/+0
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1815)
2016-11-02Fix link to LibFuzzerSergey Bronnikov1-1/+1
CLA: trivial Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1801)
2016-11-02Add a read_ahead testMatt Caswell1-3/+23
This test checks that read_ahead works correctly when dealing with large records. Reviewed-by: Richard Levitte <levitte@openssl.org>