Richard Levitte [Thu, 17 Mar 2016 21:29:20 +0000 (22:29 +0100)]
Remove generation of ms/version32.rc from Configure, use util/mkrc.pl
utils/mkrc.pl was added a while ago as a better generator for the
Windows DLL resource file. Finalize the change by removing the
ms/version32.rc generator from Configure and adding resource file
support using mkrc.pl in Configurations/windows-makefile.pl
Todd Short [Sat, 12 Mar 2016 14:14:05 +0000 (09:14 -0500)]
Fix ALPN - more fixes
* Clear proposed, along with selected, before looking at ClientHello
* Add test case for above
* Clear NPN seen after selecting ALPN on server
* Minor documentation updates
Rich Salz [Fri, 18 Mar 2016 18:30:20 +0000 (14:30 -0400)]
Remove #error from include files.
Don't have #error statements in header files, but instead wrap
the contents of that file in #ifndef OPENSSL_NO_xxx
This means it is now always safe to include the header file.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Richard Levitte [Sat, 19 Mar 2016 19:04:51 +0000 (20:04 +0100)]
Don't let 'generate' target depend on generated files, act directly instead
One of the 'generate' targets depended on $(SRCDIR)/apps/progs.h,
which depended on... nothing. This meant it never got regenerated
once it existed, regardless of need. Of course, we could have it
depend on all the files checked to generate it, but they also depend
on progs.h, so we'd end up getting cricular dependencies, which makes
make unhappy.
Furthermore, and this applies for the other generated files, having
them as targets means that they may be regenerated on the fly in some
cases, and since they get written to the source tree, this isn't such
a good idea if that tree is read-only (which is a possible situation
in an out-of-tree build).
So, we move all the actions to the 'generate' targets themselves, thus
making sure they get regenerated in a controlled manner and regardless
of dependencies.
Richard Levitte [Sat, 19 Mar 2016 10:18:56 +0000 (11:18 +0100)]
Replace sed command with perl
Some implementations of sed require a newline before an ending '}'.
The easier method is to replace that sed command with the
corresponding perl command.
Richard Levitte [Sat, 19 Mar 2016 10:15:00 +0000 (11:15 +0100)]
Clear the exit code from 'find' in 'make depend'
Depending on what has been built so far, all .d files may not be
present and 'find' will exit with non-zero exit code. This isn't a
bother for us but may break make, so clear the exit code with an added
'exit 0'.
Richard Levitte [Fri, 18 Mar 2016 19:52:29 +0000 (20:52 +0100)]
Better 'make depend' mechanism
Instead of relying on the '-nt' test operator, which doesn't exist
everywhere, use find's '-newer' to find out if any of the known .d
files is newer than Makefile.
Richard Levitte [Fri, 18 Mar 2016 07:57:52 +0000 (08:57 +0100)]
Make OpenSSL::Test::run() sensitive to signals
$? in perl gets the status value from wait(2), which is a word with
the exit code in the upper half and the number of a raised signal in
the lower half. OpenSSL::Test::run() ignored the signal half up until
now.
With this change, we recalculate an exit code the same way the Unix
shells do, using this formula:
Matt Caswell [Thu, 17 Mar 2016 11:50:23 +0000 (11:50 +0000)]
Ensure that no-comp functions are flagged as such
mkdef.pl was not detecting no-comp functions. This updates the header file
so that mkdef.pl detects that no-comp applies, and the functions are marked
accordingly.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Matt Caswell [Mon, 14 Mar 2016 17:06:19 +0000 (17:06 +0000)]
Fix a potential double free in EVP_DigestInit_ex
There is a potential double free in EVP_DigestInit_ex. This is believed
to be reached only as a result of programmer error - but we should fix it
anyway.
Issue reported by Guido Vranken.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Richard Levitte [Thu, 17 Mar 2016 20:13:23 +0000 (21:13 +0100)]
README: small fixups
Don't refer to INSTALL files that don't exist any more.
Make it clear that the libssl and libcrypto libraries may be named
differently on different platforms.
Richard Levitte [Wed, 9 Mar 2016 23:04:04 +0000 (00:04 +0100)]
Added build.info debugging capability to Configure
This is only enabled when the environment variable
CONFIGURE_DEBUG_BUILDINFO is defined. This will cause every line in
every build.info file to be displayed, along with the content of the
skip stack before and after parsing. This can be a very powerful tool
to see that all conditions are working as expected.
Richard Levitte [Sat, 5 Mar 2016 12:11:37 +0000 (13:11 +0100)]
Don't define OPENSSL_ENGINES in test recipes, do it in Makefiles instead
In most builds, we can assume that engines live in the build tree
subdirectory "engines". This was hard coded into the tests that use
the engine ossltest.
However, that hard coding is tedious, it would need to be done in
every test recipe, and it's an incorrect assumption in some cases.
This change has us play it safe and let the build files tell the
testing framework where the engines are.
Matt Caswell [Wed, 16 Mar 2016 10:38:39 +0000 (10:38 +0000)]
Some platforms provide getcontext() but it does not work
Some platforms claim to be POSIX but their getcontext() implementation
does not work. Therefore we update the ASYNC_is_capable() function to test
for this.
RT#4366
Reviewed-by: Richard Levitte <levitte@openssl.org>
Richard Levitte [Wed, 16 Mar 2016 15:50:18 +0000 (16:50 +0100)]
When building DLLs, hack the library name in the .def file
util/mkdef.pl assumes it knows what the resulting library name will
be. Really, it shouldn't, but changing it will break classic native
Windows builds, so we leave it for now and change the LIBRARY line
externally when needed instead.
Matt Caswell [Wed, 16 Mar 2016 11:16:11 +0000 (11:16 +0000)]
We should use $SRCDIR in Makefiles
Normally we always refer to source files relative to $SRCDIR in Makefiles.
However the reference to unix-Makefile.tmpl was using a fully expanded
absolute path. This can cause problems for Mingw.
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
Matt Caswell [Wed, 16 Mar 2016 10:08:53 +0000 (10:08 +0000)]
Disable AFALG when cross-compiling
We don't currently support cross-compiling of the afalg engine. However
we were failing to explicitly mark it as disabled during Configure leading
to a failed build.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Matt Caswell [Tue, 15 Mar 2016 16:44:26 +0000 (16:44 +0000)]
Fix a TLSProxy race condition
TLSProxy starts s_server and specifies the number of client connects
it should expect. After that s_server is supposed to close down
automatically. However, if another test is then run then TLSProxy
will start a new instance of s_server. If the previous instance
hasn't closed down yet then the new instance can fail to bind to
the socket.
Reviewed-by: Richard Levitte <levitte@openssl.org>
fbroda [Tue, 15 Mar 2016 09:08:49 +0000 (10:08 +0100)]
General verify options to openssl ts
This commit adds the general verify options of ocsp, verify,
cms, etc. to the openssl timestamping app as suggested by
Stephen N. Henson in [openssl.org #4287]. The conflicting
"-policy" option of "openssl ts" has been renamed to
"-tspolicy". Documentation and tests have been updated.
CAVE: This will break code, which currently uses the "-policy"
option.
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>