aboutsummaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)AuthorFilesLines
2016-02-14Don't use libcrypto private headers with mkdef.plRichard Levitte1-3/+2
Three header files from crypto/include/internal were used by util/mkdef.pl. This should never be needed. Some test program used these, which made it a valid reason at the time to make the some internal symbols public in the shared libraries, but that's not the case any more. However, to be able to link libssl.so, some symbols found in include/internal headers still need to be made public. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-14Prefer IO::Socket::INET6 over IO::Socket::IPRichard Levitte1-12/+11
While IO::Socket::IP is a core perl module (since Perl v5.19.8, or so says corelist), IO::Socket::INET6 has been around longer, is said to be more widely deployed, and most importantly, seems to have less bugs hitting us. We therefore prefer IO::Socket::INET6, and only fall back to IO::Socket::IP if the former doesn't exist on the local system. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-13Fix some issues near recent chomp changes.Viktor Dukhovni3-6/+8
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-12Rename INSTALL_PREFIX to DESTDIR, remove option --install_prefixRichard Levitte1-10/+10
INSTALL_PREFIX is a confusing name, as there's also --prefix. Instead, tag along with the rest of the open source world and adopt the Makefile variable DESTDIR to designate the desired staging directory. The Configure option --install_prefix is removed, the only way to designate a staging directory is with the Makefile variable (this is also implemented for VMS' descrip.mms et al). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11Perl's chop / chomp considered bad, use a regexp insteadRichard Levitte10-25/+23
Once upon a time, there was chop, which somply chopped off the last character of $_ or a given variable, and it was used to take off the EOL character (\n) of strings. ... but then, you had to check for the presence of such character. So came chomp, the better chop which checks for \n before chopping it off. And this worked well, as long as Perl made internally sure that all EOLs were converted to \n. These days, though, there seems to be a mixture of perls, so lines from files in the "wrong" environment might have \r\n as EOL, or just \r (Mac OS, unless I'm misinformed). So it's time we went for the more generic variant and use s|\R$||, the better chomp which recognises all kinds of known EOLs and chops them off. A few chops were left alone, as they are use as surgical tools to remove one last slash or one last comma. NOTE: \R came with perl 5.10.0. It means that from now on, our scripts will fail with any older version. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11util/mk1mf.pl: use LINK_CMD instead of LINK variable.Andy Polyakov9-18/+18
Trouble is that LINK variable assignment in make-file interferes with LINK environment variable, which can be used to modify Microsoft's LINK.EXE behaviour. RT#4289 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Don't add filename comment.Rich Salz1-1/+0
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Move to REF_DEBUG, for consistency.Rich Salz2-2/+2
Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT This is also RT 4181 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Make util/mkrc.pl location agnostic and adapt Makefile.sharedRichard Levitte1-1/+8
With this, Cygwin and Mingw builds stand a much better chance to be able to build outside of the source tree with the unified build. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-11Hide OPENSSL_INIT_SETTINGS.Rich Salz1-0/+3
Make OPENSSL_INIT_SETTINGS an opaque structure. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Make comment match realityRichard Levitte1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Produce buildinf.h on Windows the same way as on UnixRichard Levitte3-49/+73
Because ENGINESDIR and OPENSSLDIR typically contains backslashes, they need to be escaped just right. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Make sure to escape backslashes and single quotes for buildinf.hRichard Levitte1-1/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Make it possible to get ENGINESDIR info from OpenSSL_versionsRichard Levitte1-0/+4
Have apps/openssl display the result along with OPENSSLDIR As part of this, add ENGINESDIR in util/mk1mf.pl Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Rename INIT funtions, deprecate old ones.Rich Salz2-5/+5
Man, there were a lot of renamings :) Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-10clean away old VMS cruftRichard Levitte3-218/+76
The old building scripts get removed, they are hopelessly gone in bit rot by now. Also remove the old symbol hacks. They were needed needed to shorten some names to 31 characters, and to resolve other symbol clashes. Because we now compile with /NAMES=(AS_IS,SHORTENED), this is no longer required. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10unified build scheme: add a "unified" template for VMS descrip.mmsRichard Levitte1-18/+15
As part of this, change util/mkdef.pl to stop adding libraries to depend on in its output. mkdef.pl should ONLY output a symbol vector. Because symbol names can't be longer than 31 characters, we use the compiler to shorten those that are longer down to 23 characters plus an 8 character CRC. To make sure users of our header files will pick up on that automatically, add the DEC C supported extra headers files __decc_include_prologue.h and __decc_include_epilogue.h. Furthermore, we add a config.com, so VMS people can configure just as comfortably as any Unix folks, thusly: @config Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10unified build scheme: give util/dofile.pl the possibility to output selectivelyRichard Levitte1-10/+81
Under certain conditions, one might not want to output certain sections of a template file. This adds the functions output_off() and output_on(), reachable inside the templates. And example usage in a Makefile template could be this: @ : {- output_off() if $config{no_shared}; "" -} ... lines dealing with shared libraries @ : {- output_on() -} Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-10Remove store.Rich Salz1-5/+5
Rebased and merged by me, with Ben's approval. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Ben Laurie <ben@openssl.org>
2016-02-09Updates for auto init/deinit review commentsMatt Caswell1-0/+1
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 Caswell1-0/+3
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 Caswell1-2/+2
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 Caswell1-25/+25
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 Caswell3-1/+8
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 Levitte1-5/+8
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 Henson1-6/+18
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08rename old functions names in libeay.numDr. Stephen Henson1-6/+6
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08Deprecate undocumented SSL_cache_hit().Dr. Stephen Henson1-1/+1
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 Percival3-3/+3
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 Henson1-0/+1
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-06Add BIO_ADDR_clear to libeay.numKurt Roeckx1-0/+1
Reviewed-by: Matt Caswell <matt@openssl.org> MR: #1874
2016-02-05RT4070: Improve struct/union regexpEllinger, Wesley M1-1/+1
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-05Make DTLSv1_listen a first class function and change its typeMatt Caswell1-0/+1
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 Dukhovni1-1/+1
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2016-02-05make updateDr. Stephen Henson1-0/+4
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-04Add option to disable asyncTodd Short1-0/+3
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 Dukhovni1-0/+1
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 Levitte2-2/+2
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-04Make the mk1mf 'mv' command variableRichard Levitte4-1/+7
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-03Refactoring BIO: small test correctionRichard Levitte1-1/+1
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-02-03Refactoring BIO: add a simple networking test of s_client and s_serverRichard Levitte1-11/+61
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 Levitte1-5/+11
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-03Refactoring BIO: add error macros & text, and make updateRichard Levitte1-0/+17
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2016-02-03RT3234: disable compressionEmilia Kasper1-1/+1
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 Henson1-0/+3
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-01Better check for gcc/clangRich Salz1-5/+6
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 Henson1-0/+3
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 Henson1-0/+1
PR#4280 Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-01-29Templatize util/domdRich Salz3-35/+26
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-29Merge error, wrong domd submitted.Rich Salz1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>