summaryrefslogtreecommitdiffstats
path: root/util
AgeCommit message (Collapse)Author
2016-02-09Updates for auto init/deinit review commentsMatt Caswell
Fixes for the auto-init/deinit code based on review comments Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Add an OPENSSL_NO_AUTOERRINIT optionMatt Caswell
This option disables automatic loading of the crypto/ssl error strings in order to keep statically linked executable file size down Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Auto init/de-init libsslMatt Caswell
Building on the pervious commit to auto initialise and de-initialise libssl Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Auto init/deinit libcryptoMatt Caswell
This builds on the previous commit to auto initialise/deinitialise libcrypto. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09Provide framework for auto initialise/deinitialise of the libraryMatt Caswell
This commit provides the basis and core code for an auto initialisation and deinitialisation framework for libcrypto and libssl. The intention is to remove the need (in many circumstances) to call explicit initialise and deinitialise functions. Explicit initialisation will still be an option, and if non-default initialisation is needed then it will be required. Similarly for de-initialisation (although this will be a lot easier since it will bring all de-initialisation into a single function). Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-09unified build scheme: adjust some scriptsRichard Levitte
util/mkdef.pl and Makefile.shared needs to know about the source and the build directories. Additionally, Makefile.shared needs to know how to build shared libraries in a directory other than the current one. Reviewed-by: Ben Laurie <ben@openssl.org>
2016-02-08make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08rename old functions names in libeay.numDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Deprecate undocumented SSL_cache_hit().Dr. Stephen Henson
Deprecate undocumented SSL_cache_hit(). Make SSL_session_reused() into a real function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-08Make TESTS= work with "nmake -f ms/ntdll.mak tests"Rob Percival
This works on Linux with Make already, and allows running only specified tests. Reviewed-by: Ben Laurie <ben@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-06make updateDr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-06Add BIO_ADDR_clear to libeay.numKurt Roeckx
Reviewed-by: Matt Caswell <matt@openssl.org> MR: #1874
2016-02-05RT4070: Improve struct/union regexpEllinger, Wesley M
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-05Make DTLSv1_listen a first class function and change its typeMatt Caswell
The DTLSv1_listen function exposed details of the underlying BIO abstraction and did not properly allow for IPv6. This commit changes the "peer" argument to be a BIO_ADDR and makes it a first class function (rather than a ctrl) to ensure proper type checking. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-05Restore -no_comp switch for backwards compatible behaviourViktor Dukhovni
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-02-05make updateDr. Stephen Henson
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-04Add option to disable asyncTodd Short
Add no-async option to Configure that forces ASYNC_NULL. Related to RT1979 An embedded system or replacement C library (e.g. musl or uClibc) may not support the *context APIs that are needed for async operation. Compiles with musl. Ran unit tests, async tests skipped as expected. Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-02-03Handle localhost being either 127.0.0.1 or ::1Viktor Dukhovni
When connecting to "localhost" the Proxy's choice of client address family may not match the server's choice address family. Without MultiHomed => 1, the proxy may try the wrong address family first, and give up without trying the other. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-04Use matching quotesRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-04Make the mk1mf 'mv' command variableRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-03Refactoring BIO: small test correctionRichard Levitte
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-03Refactoring BIO: add a simple networking test of s_client and s_serverRichard Levitte
This makes use of TLSProxy, which was expanded to use IO::Socket::IP (which is a core perl module) or IO::Socket::INET6 (which is said to be more popular) instead IO::Socket::INET if one of them is installed. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-03make updateRichard Levitte
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-03Refactoring BIO: add error macros & text, and make updateRichard Levitte
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-03RT3234: disable compressionEmilia Kasper
CRIME protection: disable compression by default, even if OpenSSL is compiled with zlib enabled. Applications can still enable compression by calling SSL_CTX_clear_options(ctx, SSL_OP_NO_COMPRESSION), or by using the SSL_CONF library to configure compression. SSL_CONF continues to work as before: SSL_CONF_cmd(ctx, "Options", "Compression") enables compression. SSL_CONF_cmd(ctx, "Options", "-Compression") disables compression (now no-op by default). The command-line switch has changed from -no_comp to -comp. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-02make updateDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-01Better check for gcc/clangRich Salz
Iteratively improved with Richard and Andy. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-31Add EC_GROUP_order_bits, EC_GROUP_get0_order and EC_GROUP_get0_cofactorDr. Stephen Henson
New functions to return internal pointer for order and cofactor. This avoids the need to allocate a new BIGNUM which to copy the value to. Simplify code to use new functions. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-30Add function to return internal enoding of X509_NAME.Dr. Stephen Henson
PR#4280 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-01-29Templatize util/domdRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-29Merge error, wrong domd submitted.Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-29Remove clean-dependRich Salz
Remove depend hacks from demos/engines. Remove clean-depend; just call makedepend (or $CC -M) and use that. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-28Remove extraneous output from util/mk scriptsRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-27Add CRYPTO_secure_zallocRich Salz
Also turn B<foo> into foo() in the pod page. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-26Add SSL_up_ref() and SSL_CTX_up_ref()Matt Caswell
The SSL and SSL_CTX structures are reference counted. However since libssl was made opaque there is no way for users of the library to manipulate the reference counts. This adds functions to enable that. Reviewed-by: Stephen Henson <steve@openssl.org>
2016-01-26Remove dirs from mkfiles.plMatt Caswell
Recent changes have removed some directories which is causing mkfiles.pl to fail. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-25Generate warning textRichard Levitte
Now that we're using templates, we should warn people not to edit the resulting file. We do it through util/dofile.pl, which is enhanced with an option to tell what file it was called from. We also change the calls so the template files are on the command line instead of being redirected through standard input. That way, we can display something like this (example taken from include/openssl/opensslconf.h): /* WARNING: do not edit! */ /* Generated by Configure from include/openssl/opensslconf.h.in */ Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-25Refactor file writing - Remake Makefile.org into a templateRichard Levitte
It is time for Makefile.org to fold into the new regime and have a run through util/dofile.pl. This forces some information out of there and into Configure, which isn't a bad thing, it makes Configure increasingly the center of build information, which is as it should be. A few extra defaults were needed in the BASE template to get rid of warnings about missing values. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-25Now that Configure doesn't produce tools/c_rehash, mk1mf has to do itRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-24Move pqueue into sslRich Salz
This is an internal facility, never documented, not for public consumption. Move it into ssl (where it's only used for DTLS). I also made the typedef's for pqueue and pitem follow our style: they name structures, not pointers. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-23Remove extra unused variable in util/dofile.plRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-22Refactor file writing - Adapt util/mkdef.pl to use configdata.pmRichard Levitte
For this adaptation, the variables $options and $version needed to move to %config in Configure, and why not move all other variables holding diverse version numbers at the same time? Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-22Refactor file writing - adapt util/dofile.pl to use with_fallbackRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-22Refactor file writing - arrange for use of bundled Perl modules as fallbackRichard Levitte
For our own convenience, we need a mechanism to be able to fall back on bundled Perl modules. It's a minimal package that's called like this: use with_fallback qw(Module1 Module2 ...); For each module, it will try to require them from the system installation, and failing that, it will temporarly add external/perl and try to require transfer::{ModuleName}. It requires that each bundled Perl modules is accompanied by a small transfer module (external/perl/transfer/ModuleName.pm in our example) that knows exactly what to load. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-22Refactor file writing - introduce template driven file writingRichard Levitte
apps/CA.pl and tools/c_rehash are built from template files. So far, this was done by Configure, which created its own problems as it forced everyone to reconfigure just because one of the template files had changed. Instead, have those files created as part of the normal build in apps/ and in tools/. Furthermore, this prepares for a future where Configure may produce entirely other build files than Makefile, and the latter can't be guaranteed to be the holder of all information for other scripts. Instead, configdata.pm (described below) becomes the center of configuration information. This introduces a few new things: %config a hash table to hold all kinds of configuration data that can be used by any other script. configdata.pm a perl module that Configure writes. It currently holds the hash tables %config and %target. util/dofile.pl a script that takes a template on STDIN and outputs the result after applying configuration data on it. It's supposed to be called like this: perl -I$(TOP) -Mconfigdata < template > result or perl -I$(TOP) -Mconfigdata templ1 templ2 ... > result Note: util/dofile.pl requires Text::Template. As part of this changed, remove a number of variables that are really just copies of entries in %target, and use %target directly. The exceptions are $target{cflags} and $target{lflags}, they do get copied to $cflags and $lflags. The reason for this is that those variable potentially go through a lot of changes and would rather deserve a place in %config. That, however, is for another commit. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-22Refresh the thinking of --prefix and --openssldirRichard Levitte
--prefix is now exclusively used for software and manual installation. --openssldir is not exclusively used as a default location for certs, keys and the default openssl.cnf. This change is made to bring clarity, to have the two less intertwined, and to be more compatible with the usual ways of software installation. Please change your habits and scripts to use --prefix rather than --openssldir for installation location now. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-19Remove the GOST engineMatt Caswell
The GOST engine is now out of date and is removed by this commit. An up to date GOST engine is now being maintained in an external repository. See: https://wiki.openssl.org/index.php/Binaries Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-19prf redirection build fixesDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-18Don't use "grep -q", "-q" is not POSIX, and fails on Solaris.Kristian Amlie
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-17Accessor update; fix API, document one.Rich Salz
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>