summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2018-08-14Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6954)
2018-07-11Windows: fix echo for nmakeRichard Levitte
It seems that nmake first tries to run executables on its own, and only pass commands to cmd if that fails. That means it's possible to have nmake run something like 'echo.exe' when the builtin 'echo' command was expected, which might give us unexpected results. To get around this, we create our own echoing script and call it explicitly from the nmake makefile. Fixes #6670 Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6686) (cherry picked from commit 9abce88b4b0055d6238a838aa00360152e185f02)
2018-07-10util/dofile.pl: require Text::Template 1.46 or newerRichard Levitte
The reason is that we override Text::Template::append_text_to_output(), and it didn't exist before Text::Template 1.46. Fixes #6641 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6682) (cherry picked from commit 4e351ca92e3a1f447cef3d2e330f13941f9412c6)
2018-07-10Make 'with_fallback' use 'use' instead of 'require'Richard Levitte
This enables us to require module versions, and to fall back to a bundled version if the system version is too low. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6682) (cherry picked from commit e9bc5706744213a1a6748dbbcd1b43a6ad4ca09e)
2018-06-11VMS: have mkdef.pl parse lettered versions properlyRichard Levitte
Fixes #6449 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6450)
2018-05-30Add APIs for custom X509_LOOKUP_METHOD creationMingtao Yang
OpenSSL 1.1.0 made the X509_LOOKUP_METHOD structure opaque, so applications that were previously able to define a custom lookup method are not able to be ported. This commit adds getters and setters for each of the current fields of X509_LOOKUP_METHOD, along with getters and setters on several associated opaque types (such as X509_LOOKUP and X509_OBJECT). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6152) (cherry picked from commit 0124f32a01b2b4f4f7146f226b6a9dfe227c4008)
2018-05-20Windows: don't install __DECC_*.HRichard Levitte
This adds the possibility to exclude files by regexp in util/copy.pl Partial fix for #3254 Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6303) (cherry picked from commit 246bd8fd0507f4555432c148eed5a9322c113bf5)
2018-05-20Quiet pod2html warningsRichard Levitte
--quiet stops warnings of this sort: Cannot find "BIO_read_ex" in podpath: cannot find suitable replacement path, cannot resolve link We know what causes these warnings, it's perfectly innocuous, and we don't want to hear it any more. Partial fix for #3254 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6304) (cherry picked from commit 6439e343fa64f06941197d085acd11bd13856596)
2018-05-16When producing man-pages, ensure NAME section is one line onlyRichard Levitte
There are *roff parsers that are strict about the NAME section being one line only. The man(7) on Debian GNU/Linux suggests that this is appropriate, so we compensate our multi-line NAME sections by fixing the *roff output. Noted by Eric S. Raymond Related to #6264 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6268) (cherry picked from commit 8d483b2de78619e8592f2558301f3295daf59690)
2018-05-01Add getter for X509_VERIFY_PARAM_get_hostflagsMatt Caswell
Fixes #5061 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6140)
2018-04-05Move the loading of the ssl_conf module to libcryptoMatt Caswell
The GOST engine needs to be loaded before we initialise libssl. Otherwise the GOST ciphersuites are not enabled. However the SSL conf module must be loaded before we initialise libcrypto. Otherwise we will fail to read the SSL config from a config file properly. Another problem is that an application may make use of both libcrypto and libssl. If it performs libcrypto stuff first and OPENSSL_init_crypto() is called and loads a config file it will fail if that config file has any libssl stuff in it. This commit separates out the loading of the SSL conf module from the interpretation of its contents. The loading piece doesn't know anything about SSL so this can be moved to libcrypto. The interpretation of what it means remains in libssl. This means we can load the SSL conf data before libssl is there and interpret it when it later becomes available. Fixes #5809 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5879)
2018-03-31Refuse to run test_cipherlist unless shared library matches buildRichard Levitte
test/cipherlist_test.c is an internal consistency check, and therefore requires that the shared library it runs against matches what it was built for. test/recipes/test_cipherlist.t is made to refuse running unless library version and build version match. This adds a helper program test/versions.c, that simply displays the library and the build version. Partially fixes #5751 Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5753)
2018-03-29Revert "util/dofile.pl: only quote stuff that actually needs quoting"Richard Levitte
This wasn't a good solution, too many things depend on the quotes being there consistently. This reverts commit 49cd47eaababc8c57871b929080fc1357e2ad7b8. Fixes #5772 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5773) (cherry picked from commit 00701e5ea84861b74d9d624f21a6b3fcb12e8acd)
2018-03-27Update copyright yearMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2018-03-22Handle partial messages in TLSProxyBernd Edlinger
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5726)
2018-03-19In TLSProxy::Proxy, specify TLSv1.2 as maximum allowable protocolRichard Levitte
Partially fixes #5661 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5662)
2018-03-19Add a simple method to run regression testsRichard Levitte
This is only useful when building shared libraries. This allows us to run our tests against newer libraries when the time comes. Simply do this: OPENSSL_REGRESSION=/other/OpenSSL/build/tree make test ($OPENSSL_REGRESSION *must* be an absolute path) Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5620)
2018-03-06util/dofile.pl: only quote stuff that actually needs quotingRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5533) (cherry picked from commit 49cd47eaababc8c57871b929080fc1357e2ad7b8)
2018-02-19Add X509_get0_authority_key_id() functionMassimiliano Pala
This function makes it easier to retrieve a reference to the authority key identifier (akid->keyid) inside a certificate. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5271) (cherry picked from commit b383aa2081467e8d49c3362d295da7bd5cb4e1d8)
2018-02-19OpenSSL::Test::quotify: put quotes around empty argumentsRichard Levitte
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5396) (cherry picked from commit 5845f7de8165f35829e49acd41f6a2fc3698f221)
2018-02-08util/mkdef.pl: Fix incomplete cherry-pickRichard Levitte
The cherry pick that resulted in 65de3f1657d8a3bdb7c48063931a3c619817c921 was incomplete. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5283)
2018-02-08util/mkdef.pl: use better array in search of 'DEPRECATEDIN_'Richard Levitte
%disabled_algorithms isn't necessarily initialised with the "algos" 'DEPRECATEDIN_1_1_0' etc. However, we know that @known_algorithms has them all, so use that to find them instead. Fixes #5157 (where this was reported) Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5282) (cherry picked from commit b53fdad0e4350ba49812c50305686ee5a6239111)
2018-02-08util/mkdef.pl: Trust configdata.pmRichard Levitte
This script kept its own database of disablable algorithms, which is a maintenance problem, as it's not always perfectly in sync with what Configure does. However, we do have all the data in configdata.pm, produced by Configure, so let's use that instead. Also, make sure to parse the *err.h header files, as they contain function declarations that might not be present elsewhere. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5157) (cherry picked from commit 54f3b7d2f5a313e5c702f75ee030f8a08e6bf6aa)
2018-01-19Create one permanent proxy socket per TLSProxy::Proxy instanceRichard Levitte
On Windows, we sometimes see a behavior with SO_REUSEADDR where there remains lingering listening sockets on the same address and port as a newly created one. To avoid this scenario, we don't create a new proxy port for each new client run. Instead, we create one proxy socket when the proxy object is created, and close it when destroying that object. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/5095) (cherry picked from commit c7454e1af74b1b99f3f47f782a6ac484c4c55b7f)
2018-01-18TLSProxy::Proxy: Don't use ReuseAddr on WindowsRichard Levitte
On Windows, we sometimes see a behavior with SO_REUSEADDR where there remains lingering listening sockets on the same address and port as a newly created one. An easy solution is not to use ReuseAddr on Windows. Thanks Bernd Edlinger for the suggestion. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/5103) (cherry picked from commit e02d5886636095c26a8bff1bf8344bd0bba7ccff)
2018-01-17TLSProxy::Proxy: don't waste time redirecting STDOUT and STDERRRichard Levitte
On Windows, it seems that doing so in a forked (pseudo-)process sometimes affects the parent, and thereby hides all the results that are supposed to be seen by the running test framework (the "ok" and "not ok" lines). It turns out that our redirection isn't necessary, as the test framework seems to swallow it all in non-verbose mode anyway. It's possible that we did need this at some point, but the framework has undergone some refinement since then... Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5100) (cherry picked from commit 825038d8c36075488922617e48fc4782afe871d1)
2018-01-17TLSProxy::Proxy: If we don't support IPv6, force IPv4Richard Levitte
We use the first we can of the following IO::Socket modules to create sockets: - IO::Socket::INET6 - IO::Socket::IP - IO::Socket::INET The last of them doesn't support IPv6, so if that's the one available, we must force the s_client and s_server processes to use IPv4. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/5092) (cherry picked from commit c44bab084ed139b5e5c3f6b318bf1bf65e04cfa5)
2018-01-16Extend timeout for TLSProxyMatt Caswell
I received this error from a TLSProxy test: Failed to start up server (localhost,4443): Transport endpoint is not connected So, extend the timeout before we give up trying to connect to the server. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5088) (cherry picked from commit 82992a4130e668c14ff66fca26170629b23c4556)
2018-01-13Catch SIGPIPE in TLSProxy::Proxy::clientstartBernd Edlinger
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5071) (cherry picked from commit 438e57a43f096d37bf316869b98780e24596a5e8)
2018-01-09Update copyright years on all files merged since Jan 1st 2018Richard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5039)
2018-01-09Various small build improvements on mkdef.pl, progs.plDavid von Oheimb
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4994) (cherry picked from commit ab307dc645502d025c2760160062d5032da56bf7)
2017-12-16Fix invalid function type casts.Bernd Edlinger
Rename bio_info_cb to BIO_info_cb. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4943)
2017-12-12make updateBen Kaduk
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit f1d3de718bc96e70ce76bf2b4ccee128ecbcd100) Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4723)
2017-11-30Make possible variant SONAMEs and symbol versionsViktor Dukhovni
This small change in the Unix template and shared library build scripts enables building "variant" shared libraries. A "variant" shared library has a non-default SONAME, and non default symbol versions. This makes it possible to build (say) an OpenSSL 1.1.0 library that can coexist without conflict in the same process address space as the system's default OpenSSL library which may be OpenSSL 1.0.2. Such "variant" shared libraries make it possible to link applications against a custom OpenSSL library installed in /opt/openssl/1.1 or similar location, and not risk conflict with an indirectly loaded OpenSSL runtime that is required by some other dependency. Variant shared libraries have been fully tested under Linux, and build successfully on MacOS/X producing variant DYLD names. MacOS/X Darwin has no symbol versioning, but has a non-flat library namespace. Variant libraries may therefore support multiple OpenSSL libraries in the same address space also with MacOS/X, despite lack of symbol versions, but this has not been verified. Variant shared libraries are optional and off by default. Reviewed-by: Richard Levitte <levitte@openssl.org>
2017-11-10util/copy.pl: work around glob quirk in some of earlier 5.1x Perl versions.Andy Polyakov
In earlier 5.1x Perl versions quoting globs works only if there is white space. If there is none, it's looking for names starting with ". Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4695) (cherry picked from commit 1097d2a39e3f85d4dac2c4d1c238792d6e1d959f)
2017-11-07Fix race condition in TLSProxyMatt Caswell
Normally TLSProxy waits for the s_server process to finish before continuing. However in cases where serverconnects > 1 we need to keep the s_server process around for a later test so we continue immediately. This means that TAP test output can end up being printed to stdout at the same time as s_server is printing stuff. This confuses the test runner and can cause spurious test failures. This commit introduces a small delay in cases where serverconnects > 1 in order to give s_server enough time to finish what it was doing before we continue to the next test. Fixes #4129 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4661)
2017-11-05Consolidate the locations where we have our internal perl modulesRichard Levitte
Instead of having perl modules under test/testlib and util, consolidate them all to be inside util/perl. (this is an adaptation of the part of #4069 that wasn't included in #4666) Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4667)
2017-11-05Perl: Use our own globbing wrapper rather than File::Glob::globRichard Levitte
File::Glob::glob is deprecated, it's use generates this kind of message: File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. at ../master/Configure line 277. The first idea was to use a construction that makes the caller glob() use File::Glob::bsd_glob(). That turned out not to work well everywhere, so instead, we make our own wrapper, OpenSSL::Glob and use that. Fixes #4636 (this is an adaptation of #4040 and part of #4069, for 1.1.0) Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4666)
2017-11-03Spelling doc #3580FdaSilvaYY
Duplicated tests descriptions Backport of #3580 to 1.1.0 plus a few other typo fixes found at fligth. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/4645)
2017-10-31Adapt util/find-doc-nits back to 1.1.0Richard Levitte
This version was a direct port from 1.1.1-dev, which has a different source structure for the docs. Adjustment done. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4633)
2017-10-19Additional name for all commandsRich Salz
Add openssl-foo as a name for the openssl "foo" command. Addresses an issue found by a usability study to be published. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4553) (cherry picked from commit 3f2181e6fadea9e7ad8810b3f170fd0b2154e8b8)
2017-10-12make updateDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4503)
2017-10-09Fix util/find-doc-nits to correctly parse function signature typedefsRichard Levitte
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/4499) (cherry picked from commit 0ed78e78007bb74e48e6f59fa2388bb244153bf0)
2017-08-31util/mkdef.pl: handle line terminators correctlyRichard Levitte
When parsing the header files, mkdef.pl didn't clear the line terminator properly. In most cases, this didn't matter, but there were moments when this caused parsing errors (such as CRLFs in certain cases). Fixes #4267 Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4304) (cherry picked from commit e66b62b86e7725bdace0f24a76baa61db9c763f8)
2017-08-03Revert "Perl: Use File::Glob::bsd_glob rather than File::Glob::glob"Richard Levitte
This needs more change that what is appropriate for the 1.1.0 branch. This reverts commit 0401110073cd392602855f9b72af2ebec7909625. Reviewed-by: Andy Polyakov <appro@openssl.org>
2017-07-29Implement the CRYPTO_secure_clear_free function.Bernd Edlinger
Use OPENSSL_secure_clear_free for secure mem BIOs and X25519 private keys. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4048)
2017-07-28Perl: Use File::Glob::bsd_glob rather than File::Glob::globRichard Levitte
File::Glob::glob is deprecated, it's use generates this kind of message: File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob() instead. at ../master/Configure line 277. So instead, use a construction that makes the caller glob() use File::Glob::bsd_glob(). Note that we're still excluding VMS, as it's directory specs use '[' and ']', which have a different meaning with bsd_glob and would need some extra quoting. This might change, but later. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4040) (cherry picked from commit 102c9e1296b656c4049c1110abc8a52b43bd0dcf)
2017-06-29util/mkdef.pl: Make symbol version processing Linux onlyRichard Levitte
For Windows, we care which way it is, the resulting file is just a pile of symbols. For VMS, we really need to care about the numeric ordering, and getting the symbols sorted by symbol version too didn't agree with that. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3804) (cherry picked from commit 0e288c2af2f24121ebd5f0c58912d9429915c02a)
2017-06-29util/mkdef.pl: Add UNIX as a platformRichard Levitte
This allows us to guard Unix specific functions with #ifndef / #ifdef OPENSSL_SYS_UNIX Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3804) (cherry picked from commit 9c06cf04ee9aa6682e6cc635aeb453ac12e641c1)
2017-05-31Wait longer for the server in TLSProxy to startMatt Caswell
In a recent PR (#3566) it seems that TLSProxy gave up trying to connect to the server process too quickly. This meant the test failed even though the server *did* eventually start. Currently we try 3 times to connect with a 0.1 second pause between each attempt. That is probably too aggressive. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3587) (cherry picked from commit 142463c9375efdcdaa4c504f6aaf5bfd61d5ba99)