Commit Graph

1072 Commits

Author SHA1 Message Date
Kurt Roeckx c5c7700c9a When using no-dtls create OPENSSL_NO_DTLS
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>

MR: #2452
2016-03-28 01:12:43 +02:00
Ben Laurie b8ce6dda36 Fix enable-zlib no-comp.
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-22 11:15:38 +00:00
Ben Laurie 3fd4d211ae sctp requires dgram.
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-22 11:14:28 +00:00
Matt Caswell 168c3b737e Fix no-gost
Configure had the wrong name for the no-gost option.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-21 16:28:40 +00:00
Matt Caswell dc110177de Remove the no-rijndael option
Rijndael is an old name for AES.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-03-21 14:40:05 +00:00
Richard Levitte 007c80eae4 Remove the remainder of util/mk1mf.pl and companion scripts
This removes all scripts that deal with MINFO as well, since that's
only used by mk1mf.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-21 11:02:00 +01:00
Richard Levitte 0ef1ce49ee 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

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-21 11:00:21 +01:00
Richard Levitte 3850f8cb15 Make apps/progs.pl more flexible
Make Configure write @disablables to configdata.pm and have
apps/progs.pl use that data.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 01:49:31 +01:00
Richard Levitte d4037cea3c Correct the export list when writing configdata.pm
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 01:31:48 +01:00
Richard Levitte da1f2104c7 Correct the check of files to depend on against known generated ones
The check was erroneously inversed

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-19 01:29:01 +01:00
Richard Levitte 1f2e1cd5e8 Make picker, thread and combine standard config helper functions
Document them as well

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-17 22:46:14 +01:00
Rich Salz 1fbab1dc6f Remove Netware and OS/2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-17 17:06:57 -04:00
Richard Levitte 014267f68c Disallow --classic for Windows
With all the config changes, mk1mf is broken on Windows.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-17 21:35:31 +01:00
Richard Levitte 2b6b606c7b 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.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-17 19:08:16 +01:00
Matt Caswell 68dc37c126 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>
2016-03-16 10:08:53 +00:00
Richard Levitte 3e19b07f14 static-engine is no longer an internal keyword, remove it from %disabled
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-15 14:05:35 +01:00
Emilia Kasper c91a0a8343 Disable afalg when engine is disabled.
Also make it possible to disable afalg separately.

we still need to update config again

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-14 17:03:53 +01:00
Richard Levitte 9f519addc0 Enforce the demand for Perl 5.10.0 as a minimum.
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-14 11:21:35 +01:00
Richard Levitte 01d9997659 Fix a few Configure errors
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-14 11:21:35 +01:00
Bill Cox 2d0b441267 Add blake2 support.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11 10:39:10 -05:00
Andy Polyakov d0db7ee0b1 Configure: remove dependency on 'head'.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-11 15:26:55 +01:00
Richard Levitte 0069806128 Don't build dynamic engines unless configured "shared"
Experience has shown that dynamic engines with their own copy of
libcrypto is problematic, so we disable that possibility.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-11 12:58:15 +01:00
Richard Levitte 39affe19dc Configure - don't trust $1 to stick around, save its value away
Reviewed-by: Stephen Henson <steve@openssl.org>
2016-03-10 20:13:01 +01:00
Richard Levitte c5798e0eb5 Correct slight logic error in processing IF in build.info
This corrects a fault where the inner IF in this example was still
being acted upon:

  IF[0]
    ...whatever...
    IF[1]
      ...whatever more...
    ENDIF
  ENDIF

With this change, the inner IF is skipped over.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09 23:58:44 +01:00
Richard Levitte c471884996 Comment away the extra checks in Configure
The "extra checks" is a debugging tool to check the config resolving
mechanism.  It uses Perl's smart match, which is experimental and
therefore always causes Perl to give out a warning, and it causes
older Perl versions to fail entirely.

So, it gets commented away, but stays otherwise in place, as it may be
useful again.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09 17:59:14 +01:00
Richard Levitte 635bd409b3 In build.info, an IF within a clause that's skipped over shouldn't apply
If we find an IF within a clause that's skipped over, set it to be
skipped as well.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09 14:53:30 +01:00
Matt Caswell 2e52e7df51 Remove the old threading API
All OpenSSL code has now been transferred to use the new threading API,
so the old one is no longer used and can be removed. We provide some compat
macros for removed functions which are all no-ops.

There is now no longer a need to set locking callbacks!!

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-09 12:41:39 +00:00
Richard Levitte 79fff39d71 Don't check the conditions to build e_afalg if configured "no-engine"
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-09 12:51:07 +01:00
Richard Levitte 63ee7129f1 Have Configure display the value of SHARED_CFLAG
Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-09 12:33:23 +01:00
Richard Levitte 30752dd7df Check gcc version to see if it supports -MM and friends
According to manuals found here: https://gcc.gnu.org/onlinedocs/, GNU
C version 3 and on support the dependency generation options.  We
therefore need to check the gcc version to see if we're going to use
it or makedepend for dependency generation.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-09 12:09:30 +01:00
Richard Levitte 09aa263a14 Add the configure option 'no-makedepend'
If no makedepend program or equaly capable compiler is present,
'makedepend' gets disabled automatically.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-09 01:57:52 +01:00
Richard Levitte dc3365f729 Add the Configure option --classic, to fall back on classic build schemes
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-08 10:48:25 +01:00
Richard Levitte 39b25ee244 Revert "unified build scheme: Try to nudge users to try the "unified" build"
This reverts commit 242ffb05a2.

Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-08 10:48:25 +01:00
Matt Caswell fa22f98f19 Fix building without multiblock support
Not all platforms support multiblock. Building without it fails prior to
this fix.

RT#4396

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-08 08:52:45 +00:00
Richard Levitte 8a67946e5b Unified - Add the build.info command OVERRIDE, to avoid build file clashes
Should it be needed because the recipes within a RAW section might
clash with those generated by Configure, it's possible to tell it
not to generate them with the use of OVERRIDES, for example:

    SOURCE[libfoo]=foo.c bar.c

    OVERRIDES=bar.o
    BEGINRAW[Makefile(unix)]
    bar.o: bar.c
        $(CC) $(CFLAGS) -DSPECIAL -c -o $@ $<
    ENDRAW[Makefile(unix)]

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07 18:25:56 +01:00
Richard Levitte ae4c745075 Unified - Add the build.info command GENERATE, to generate source files
In some cases, one might want to generate some source files from
others, that's done as follows:

    GENERATE[foo.s]=asm/something.pl $(CFLAGS)
    GENERATE[bar.s]=asm/bar.S

The value of each GENERATE line is a command line or part of it.
Configure places no rules on the command line, except the the first
item muct be the generator file.  It is, however, entirely up to the
build file template to define exactly how those command lines should
be handled, how the output is captured and so on.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-07 18:25:56 +01:00
Matt Caswell 8da00a38cd Misc afalg build fixes
Misc afalg build fixes as suggested by Richard Levitte for the latest
Configure changes.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-07 13:36:17 +00:00
clucey 6cba4a6661 Rework based on feedback:
1. Cleaned up eventfd handling
2. Reworked socket setup code to allow other algorithms to be added in
   future
3. Fixed compile errors for static build
4. Added error to error stack in all cases of ALG_PERR/ALG_ERR
5. Called afalg_aes_128_cbc() from bind() to avoid race conditions
6. Used MAX_INFLIGHT define in io_getevents system call
7. Coding style fixes

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-07 13:36:17 +00:00
clucey 7f458a48ff ALG: Add AFALG engine
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2016-03-07 13:36:17 +00:00
Richard Levitte 6928b6171a Change names of ordinals and libs, libeay => libcrypto and ssleay => libssl
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-05 09:02:33 +01:00
Kurt Roeckx 9829b5ab52 Disable SSLv3 by default
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Emilia Kasper <emilia@openssl.org>

MR: #2203
2016-03-04 18:48:06 +01:00
Matt Caswell 8b1a5af389 Don't build RC4 ciphersuites into libssl by default
RC4 based ciphersuites in libssl have been disabled by default. They can
be added back by building OpenSSL with the "enable-weak-ssl-ciphers"
Configure option at compile time.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-04 10:04:06 +00:00
Richard Levitte 25004db793 Restore the zlib / zlib-dynamic logic
The proper logic is that both zlib and zlib-dynamic are disabled by
default and that enabling zlib-dynamic would enable zlib.  Somewhere
along the way, the logic got changed, zlib-dynamic was enabled by
default and zlib didn't get automatically enabled.

This change restores the original logic.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-04 05:22:22 +01:00
Richard Levitte 2952b9b811 Don't copy from %target to %config so much, see %config as a complement
We copied $target{cflags}, $target{defines} and a few more to %config,
just to add to the entries.  Avoid doing so, and let the build templates
deal with combining the two.

There are a few cases where we still fiddle with %target, but that's
acceptable.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte 9c62a279fe Configure - Get rid of the special thread_cflag, replace with thread_scheme
The thread_cflag setting filled a double role, as kinda sorta an
indicator of thread scheme, and as cflags.  Some configs also added
lflags and ex_libs for multithreading regardless of if threading would
be enabled or not.

Instead of this, add threading cflags among in the cflag setting,
threading lflags in the lflag setting and so on if and only if threads
are enabled (which they are by default).

Also, for configs where there are no special cflags for threading (the
VMS configs are of that kind), this makes it possible to still clearly
mention what thread scheme is used.

The exact value of thread scheme is currently ignored except when it's
"(unknown)", and thereby only serves as a flag to tell if we know how
to build for multi-threading in a particular config.  Yet, the
currently used values are "(unknown)", "pthreads", "uithreads" (a.k.a
solaris threads) and "winthreads".

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte 8864f0de7b Configure - get rid of the special debug_ and release_ settings
Instead, make the build type ("debug" or "release") available through
$config{build_type} and let the configs themselves figure out what the
usual settings (such as "cflags", "lflags" and so on) should be
accordingly.

The benefit with this is that we can now have debug and release
variants of any setting, not just those Configure supports, and may
also involve other factors (the MSVC flags /MD[d] and /MT[d] involve
both build type and whether threading is enabled or not)

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte 940a09bad4 Minimize copied config settings
$target{lflags} and $target{plib_flag} were copied to %config for no
good reason.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte 98fdbce091 Configure - move the addition of the zlib / libz lib to configs
Configure had the Unix centric addition of -lz when linking with zlib
is enabled, which doesn't work on other platforms.  Therefore, we move
it to the BASE_unix config template and add corresponding ones in the
other BASE_* config templates.  The Windows one is probably incomplete,
but that doesn't matter for the moment, as mk1mf does it's own thing
anyway.

This required making the %withargs table global, so perl snippets in
the configs can use it.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte d2b2221a04 Configure - Rename BASE to DEFAULTS and add a few inheritable BASEs
These BASE templates are intended to hold values that are common for
all configuration variants for whole families of configurations.

So far, three "families" are identified: Unix, Windows and VMS, mostly
characterised by the build system they currently use.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00
Richard Levitte b0b92a5bb5 Configure - Allow CODErefs and ARRAYrefs in configuration setting arrays
This provides for more powerful lazy evaluation and buildup of the
setting contents.  For example, something like this becomes possible:

    defines => [ sub { $config{thisorthat} ? "FOO" : () } ]

Any undefined result of such functions (such as 'undef' or the empty
list) will be ignored.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-03-02 19:15:42 +01:00