oweals/openssl.git
8 years agoHarmonize the option processing in 'config' and 'config.com'
Richard Levitte [Thu, 10 Mar 2016 13:20:50 +0000 (14:20 +0100)]
Harmonize the option processing in 'config' and 'config.com'

The help text for -d in 'config' was aged, and the option processing
in 'config.com' was just different.  This harmonizes 'config.com' with
the instructions in INSTALL and both current reality.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdd cleaning targets to Configurations/windows-makefile.tmpl
Richard Levitte [Thu, 10 Mar 2016 00:51:53 +0000 (01:51 +0100)]
Add cleaning targets to Configurations/windows-makefile.tmpl

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoThe typedef ECPARAMETERS is already defined, don't define it anew
Richard Levitte [Thu, 10 Mar 2016 10:29:08 +0000 (11:29 +0100)]
The typedef ECPARAMETERS is already defined, don't define it anew

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoAllow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platforms
David Woodhouse [Sat, 20 Feb 2016 15:07:32 +0000 (15:07 +0000)]
Allow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platforms

UEFI needs this too. Don't keep it only in the Windows/DOS ifdef block.

This is a fixed version of what was originally commit 963bb62195 and
subsequently reverted in commit 37b1f8bd62. Somewhere along the way, the
Windows/DOS ifdef actually got removed, leaving it just broken. It should
have been turned into an #elif, not removed.

This one correctly changes the logic from

    # if WINDOWS|DOS
    #  if OPENSSL_NO_SOCK
        ... no-sock ...
    #  elif !DJGPP
        ... native windows ...

to

    # if OPENSSL_NO_SOCK
       ... no-sock ...
    # elif WINDOWS|DOS
    #  if !DJGPP
        ... native windows ...

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRemove a missed item from the old thread API
Matt Caswell [Thu, 10 Mar 2016 09:21:23 +0000 (09:21 +0000)]
Remove a missed item from the old thread API

A line from cryptlib.h was missed during the old Thread API removal. This
breaks no-deprecated builds.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMark SRP_VBASE_get_by_user() as deprecated
Matt Caswell [Thu, 10 Mar 2016 09:20:06 +0000 (09:20 +0000)]
Mark SRP_VBASE_get_by_user() as deprecated

The function SRP_VBASE_get_by_user() is declared as deprecated but the
implementation was not.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoNo need to call EVP_CIPHER_CTX_init after EVP_CIPHER_CTX_new
Matt Caswell [Thu, 10 Mar 2016 09:18:50 +0000 (09:18 +0000)]
No need to call EVP_CIPHER_CTX_init after EVP_CIPHER_CTX_new

The afalgtest was unnecessarily initing an EVP_CIPHER_CTX. It is not
needed and is deprecated.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoPass down inclusion directories to source file generators
Richard Levitte [Thu, 10 Mar 2016 08:04:09 +0000 (09:04 +0100)]
Pass down inclusion directories to source file generators

The source file generators sometimes use $(CC) to post-process
generated source, and getting the inclusion directories may be
necessary at times, so we pass them down.

RT#4406

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoTravis - add missing semi-colon
Richard Levitte [Thu, 10 Mar 2016 07:36:57 +0000 (08:36 +0100)]
Travis - add missing semi-colon

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoUpdate .gitignore to ignore all cscope files
Todd Short [Sat, 5 Mar 2016 12:29:10 +0000 (07:29 -0500)]
Update .gitignore to ignore all cscope files

Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoremove ms/.rnd and add it to .gitignore
Viktor Szakats [Wed, 9 Mar 2016 14:38:06 +0000 (15:38 +0100)]
remove ms/.rnd and add it to .gitignore

Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRT3676 add: Export ASN.1 DHparams
Rich Salz [Thu, 10 Mar 2016 01:56:43 +0000 (20:56 -0500)]
RT3676 add: Export ASN.1 DHparams

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
8 years agoTravis - don't use ccache with cross compiles
Richard Levitte [Thu, 10 Mar 2016 01:14:55 +0000 (02:14 +0100)]
Travis - don't use ccache with cross compiles

Although theoretically possible, Configure doesn't treat CC variable
set like this very well: CC="ccache i686-w64-mingw32-gcc"
Also, this Travis script doesn't recognise the possibility either.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAvoid negative array index in BIO_debug_callback()
Benjamin Kaduk [Tue, 8 Mar 2016 22:44:57 +0000 (16:44 -0600)]
Avoid negative array index in BIO_debug_callback()

BIO_snprintf() can return -1 on truncation (and overflow as of commit
9cb177301fdab492e4cfef376b28339afe3ef663).  Though neither can
realistically occur while printing a pointer and short fixed string into
a buffer of length 256, the analysis to confirm that this the case goes
somewhat far up the call chain, and not all static analyzers can
successfully follow the chain of logic.

It's easy enough to clamp the returned length to be nonnegative before
continuing, which appeases the static analyzer and does not harm the
subsequent code.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoCT: check some GeneralizedTime return values
Benjamin Kaduk [Tue, 8 Mar 2016 21:53:49 +0000 (15:53 -0600)]
CT: check some GeneralizedTime return values

Some of the ASN.1 routines for the GeneralizedTime type can return
errors; check for these and do not continue past failure, so as
to appease coverity.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoWhen configured "shared", don't build static libraries on Windows
Richard Levitte [Thu, 10 Mar 2016 00:58:27 +0000 (01:58 +0100)]
When configured "shared", don't build static libraries on Windows

The reason for this is that the static libraries and the DLL import
libraries are named the same on Windows.  When configured "shared",
the static libraries are unused anyway.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMake util/mk1mf.pl recognise no-weak-ssl-ciphers
Richard Levitte [Thu, 10 Mar 2016 01:03:51 +0000 (02:03 +0100)]
Make util/mk1mf.pl recognise no-weak-ssl-ciphers

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAvoid double-free in calleres to OCSP_parse_url
Jim Basney [Wed, 9 Mar 2016 23:11:49 +0000 (17:11 -0600)]
Avoid double-free in calleres to OCSP_parse_url

set pointers to NULL after OPENSSL_free before returning to caller to
avoid possible double-free in caller

Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix return type for CRYPTO_THREAD_run_once
Mat [Thu, 10 Mar 2016 01:29:02 +0000 (02:29 +0100)]
Fix return type for CRYPTO_THREAD_run_once

return type should be int and not void

Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAdd X509_CHECK_FLAG_NEVER_CHECK_SUBJECT flag
Viktor Dukhovni [Tue, 8 Mar 2016 20:20:02 +0000 (15:20 -0500)]
Add X509_CHECK_FLAG_NEVER_CHECK_SUBJECT flag

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
8 years agoRemove duplicate typedef of ECPKPARAMETERS in ec.h
Richard Levitte [Thu, 10 Mar 2016 01:23:34 +0000 (02:23 +0100)]
Remove duplicate typedef of ECPKPARAMETERS in ec.h

Reviewed-by: Stephen Henson <steve@openssl.org>
8 years agoRun make update
Kurt Roeckx [Wed, 9 Mar 2016 21:54:16 +0000 (22:54 +0100)]
Run make update

Reviewed-by: Rich Salz <rsalz@openssl.org>
MR: #2296

8 years agoTravis - the source directory is _srcdist, not _srcdir
Richard Levitte [Thu, 10 Mar 2016 00:31:06 +0000 (01:31 +0100)]
Travis - the source directory is _srcdist, not _srcdir

Reviewed-by: Stephen Henson <steve@openssl.org>
8 years agoCorrect slight logic error in processing IF in build.info
Richard Levitte [Wed, 9 Mar 2016 22:58:44 +0000 (23:58 +0100)]
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>
8 years agoWhen grepping something starting with a dash, remember to use -e
Richard Levitte [Wed, 9 Mar 2016 21:34:27 +0000 (22:34 +0100)]
When grepping something starting with a dash, remember to use -e

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
8 years agoDeprecate the use of version-specific methods
Kurt Roeckx [Wed, 2 Mar 2016 21:39:40 +0000 (22:39 +0100)]
Deprecate the use of version-specific methods

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1824

8 years agoUse version flexible method instead of fixed version
Kurt Roeckx [Wed, 2 Mar 2016 21:38:08 +0000 (22:38 +0100)]
Use version flexible method instead of fixed version

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1824

8 years agoUse minimum and maximum protocol version instead of version fixed methods
Kurt Roeckx [Tue, 2 Feb 2016 22:58:49 +0000 (23:58 +0100)]
Use minimum and maximum protocol version instead of version fixed methods

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1824

8 years agoFix usage of OPENSSL_NO_*_METHOD
Kurt Roeckx [Tue, 2 Feb 2016 22:16:20 +0000 (23:16 +0100)]
Fix usage of OPENSSL_NO_*_METHOD

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1824

8 years agoMove disabling of RC4 for DTLS to the cipher list.
Kurt Roeckx [Tue, 8 Mar 2016 19:26:38 +0000 (20:26 +0100)]
Move disabling of RC4 for DTLS to the cipher list.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoRemove DES cipher alias
Kurt Roeckx [Wed, 9 Mar 2016 17:30:43 +0000 (18:30 +0100)]
Remove DES cipher alias

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoUpdate ciphers -s documentation
Kurt Roeckx [Sun, 7 Feb 2016 19:34:03 +0000 (20:34 +0100)]
Update ciphers -s documentation

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoDocument SSL_get1_supported_ciphers
Kurt Roeckx [Sun, 7 Feb 2016 19:33:43 +0000 (20:33 +0100)]
Document SSL_get1_supported_ciphers

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoIDEA is not supported in TLS 1.2
Kurt Roeckx [Sun, 7 Feb 2016 19:20:01 +0000 (20:20 +0100)]
IDEA is not supported in TLS 1.2

This currently seems to be the only cipher we still support that should get
disabled.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoAdd support for minimum and maximum protocol version supported by a cipher
Kurt Roeckx [Sun, 7 Feb 2016 19:17:07 +0000 (20:17 +0100)]
Add support for minimum and maximum protocol version supported by a cipher

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoAdd ssl_get_client_min_max_version() function
Kurt Roeckx [Sun, 7 Feb 2016 19:07:21 +0000 (20:07 +0100)]
Add ssl_get_client_min_max_version() function

Adjust ssl_set_client_hello_version to get both the minimum and maximum and then
make ssl_set_client_hello_version use the maximum version.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoMake SSL_CIPHER_get_version return a const char *
Kurt Roeckx [Sun, 7 Feb 2016 19:11:56 +0000 (20:11 +0100)]
Make SSL_CIPHER_get_version return a const char *

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoRemove unused code
Kurt Roeckx [Sun, 7 Feb 2016 16:52:22 +0000 (17:52 +0100)]
Remove unused code

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoMake function to convert version to string
Kurt Roeckx [Sun, 7 Feb 2016 19:56:40 +0000 (20:56 +0100)]
Make function to convert version to string

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoConstify security callbacks
Kurt Roeckx [Sun, 7 Feb 2016 19:44:27 +0000 (20:44 +0100)]
Constify security callbacks

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1595

8 years agoDocumentation for ctx_set_ctlog_list_file()
Rob Percival [Wed, 9 Mar 2016 03:12:25 +0000 (03:12 +0000)]
Documentation for ctx_set_ctlog_list_file()

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMinor improvement to formatting of SCT output in s_client
Rob Percival [Fri, 4 Mar 2016 19:07:25 +0000 (19:07 +0000)]
Minor improvement to formatting of SCT output in s_client

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoDo not display a CT log error message if CT validation is disabled
Rob Percival [Fri, 4 Mar 2016 19:06:43 +0000 (19:06 +0000)]
Do not display a CT log error message if CT validation is disabled

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoRT3676: Expose ECgroup i2d functions
Rich Salz [Wed, 9 Mar 2016 16:56:42 +0000 (11:56 -0500)]
RT3676: Expose ECgroup i2d functions

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
8 years agoComment away the extra checks in Configure
Richard Levitte [Wed, 9 Mar 2016 16:18:07 +0000 (17:18 +0100)]
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>
8 years agoMake ct_dir and certs_dir static in test/ct_test.c
Richard Levitte [Wed, 9 Mar 2016 16:24:34 +0000 (17:24 +0100)]
Make ct_dir and certs_dir static in test/ct_test.c

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFix ct_test to not assume it's in the source directory
Richard Levitte [Wed, 9 Mar 2016 13:10:05 +0000 (14:10 +0100)]
Fix ct_test to not assume it's in the source directory

ct_test assumed it's run in the source directory and failed when built
elsewhere.  It still defaults to that, but can be told another story
with the environment variables CT_DIR and CERTS_DIR.

Test recipe updated to match.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoDocument importance of CTLOG_STORE outliving SCT if SCT_set0_log is used
Rob Percival [Wed, 9 Mar 2016 15:23:58 +0000 (15:23 +0000)]
Document importance of CTLOG_STORE outliving SCT if SCT_set0_log is used

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMake SCT literals into const variables in ct_test.c
Rob Percival [Wed, 9 Mar 2016 02:46:15 +0000 (02:46 +0000)]
Make SCT literals into const variables in ct_test.c

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMakes STACK_OF(SCT)* parameter of i2d_SCT_LIST const
Rob Percival [Tue, 8 Mar 2016 19:20:22 +0000 (19:20 +0000)]
Makes STACK_OF(SCT)* parameter of i2d_SCT_LIST const

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoRemoves SCT_LIST_set_source and SCT_LIST_set0_logs
Rob Percival [Tue, 8 Mar 2016 19:09:06 +0000 (19:09 +0000)]
Removes SCT_LIST_set_source and SCT_LIST_set0_logs

Both of these functions can easily be implemented by callers instead.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMakes SCT_get0_log return const CTLOG*
Rob Percival [Tue, 8 Mar 2016 18:58:03 +0000 (18:58 +0000)]
Makes SCT_get0_log return const CTLOG*

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMakes CTLOG_STORE_get0_log_by_id return const CTLOG*
Rob Percival [Tue, 8 Mar 2016 18:55:55 +0000 (18:55 +0000)]
Makes CTLOG_STORE_get0_log_by_id return const CTLOG*

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoImproved documentation of SCT_CTX_* functions
Rob Percival [Tue, 8 Mar 2016 18:37:16 +0000 (18:37 +0000)]
Improved documentation of SCT_CTX_* functions

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoUpdates ct_err.c
Rob Percival [Tue, 8 Mar 2016 18:07:10 +0000 (18:07 +0000)]
Updates ct_err.c

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoRemove unnecessary call to SCT_set1_extensions(sct, "", 0) in ct_test.c
Rob Percival [Tue, 8 Mar 2016 17:38:41 +0000 (17:38 +0000)]
Remove unnecessary call to SCT_set1_extensions(sct, "", 0) in ct_test.c

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoReset SCT validation_status if the SCT is modified
Rob Percival [Tue, 8 Mar 2016 17:35:40 +0000 (17:35 +0000)]
Reset SCT validation_status if the SCT is modified

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoUse SCT_VERSION_V1 in place of literal 0 in ct_test.c
Rob Percival [Mon, 7 Mar 2016 18:41:43 +0000 (18:41 +0000)]
Use SCT_VERSION_V1 in place of literal 0 in ct_test.c

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFixes "usuable" typo in ct_locl.h
Rob Percival [Mon, 7 Mar 2016 18:38:17 +0000 (18:38 +0000)]
Fixes "usuable" typo in ct_locl.h

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoTreat boolean functions as booleans
Rob Percival [Mon, 7 Mar 2016 18:38:06 +0000 (18:38 +0000)]
Treat boolean functions as booleans

Use "!x" instead of "x <= 0", as these functions never return a negative
value.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMake parameters of CTLOG_get* const
Rob Percival [Fri, 4 Mar 2016 19:52:45 +0000 (19:52 +0000)]
Make parameters of CTLOG_get* const

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoExtensive application of __owur to CT functions that return a boolean
Rob Percival [Fri, 4 Mar 2016 19:51:43 +0000 (19:51 +0000)]
Extensive application of __owur to CT functions that return a boolean

Also improves some documentation of those functions.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoMakes SCT_LIST_set_source return the number of successes
Rob Percival [Fri, 4 Mar 2016 20:37:28 +0000 (20:37 +0000)]
Makes SCT_LIST_set_source return the number of successes

No longer terminates on first error, but instead tries to set the source
of every SCT regardless of whether an error occurs with some.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFix locking in ssl_cert_dup()
Todd Short [Wed, 9 Mar 2016 15:01:43 +0000 (10:01 -0500)]
Fix locking in ssl_cert_dup()

Properly check the return value of CRYPTO_THREAD_lock_new()

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoRestore building out of source with the unified build scheme
Richard Levitte [Wed, 9 Mar 2016 15:05:13 +0000 (16:05 +0100)]
Restore building out of source with the unified build scheme

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoCT test can't run without EC, so skip it on that algo as well
Richard Levitte [Wed, 9 Mar 2016 15:35:48 +0000 (16:35 +0100)]
CT test can't run without EC, so skip it on that algo as well

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFix ct_test to not assume it's in the source directory
Richard Levitte [Wed, 9 Mar 2016 13:10:05 +0000 (14:10 +0100)]
Fix ct_test to not assume it's in the source directory

ct_test assumed it's run in the source directory and failed when built
elsewhere.  It still defaults to that, but can be told another story
with the environment variables CT_DIR and CERTS_DIR.

Test recipe updated to match.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoUpdate CHANGES and NEWS
Matt Caswell [Wed, 9 Mar 2016 13:00:37 +0000 (13:00 +0000)]
Update CHANGES and NEWS

Update the CHANGES and NEWS files with information about the recently added
AFALG engine and pipelining.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix classic build
Matt Caswell [Wed, 9 Mar 2016 14:58:42 +0000 (14:58 +0000)]
Fix classic build

The Thread API changes broke classic build. This fixes it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoIn build.info, an IF within a clause that's skipped over shouldn't apply
Richard Levitte [Wed, 9 Mar 2016 13:33:37 +0000 (14:33 +0100)]
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>
8 years agoAdd an entry in NEWS about the new threading API
Matt Caswell [Wed, 9 Mar 2016 12:33:26 +0000 (12:33 +0000)]
Add an entry in NEWS about the new threading API

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoUpdate CHANGES for the new threading API
Matt Caswell [Wed, 9 Mar 2016 11:20:15 +0000 (11:20 +0000)]
Update CHANGES for the new threading API

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRemove the old threading API
Matt Caswell [Wed, 9 Mar 2016 10:35:53 +0000 (10:35 +0000)]
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>
8 years agoRemove use of the old CRYPTO_LOCK_X5O9_STORE
Matt Caswell [Wed, 9 Mar 2016 09:52:39 +0000 (09:52 +0000)]
Remove use of the old CRYPTO_LOCK_X5O9_STORE

The locking here is a bit strange and unclear. Rather than refactor
anything and possibly break stuff I have just moved to using the new
thread API following as closely as possible what was there previously.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDon't call ENGINE_cleanup when configured "no-engine"
Richard Levitte [Wed, 9 Mar 2016 11:52:50 +0000 (12:52 +0100)]
Don't call ENGINE_cleanup when configured "no-engine"

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoDon't add engines if configured "no-engine"
Richard Levitte [Wed, 9 Mar 2016 08:05:43 +0000 (09:05 +0100)]
Don't add engines if configured "no-engine"

Similarly, don't add e_capi if configured "no-capieng"

Also, indent a little deeper, for clarity.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoDon't add afalg engine if configured "no-engine"
Richard Levitte [Wed, 9 Mar 2016 08:05:03 +0000 (09:05 +0100)]
Don't add afalg engine if configured "no-engine"

Also, indent a little deeper, for clarity.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoDon't check the conditions to build e_afalg if configured "no-engine"
Richard Levitte [Wed, 9 Mar 2016 08:04:01 +0000 (09:04 +0100)]
Don't check the conditions to build e_afalg if configured "no-engine"

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoHave Configure display the value of SHARED_CFLAG
Richard Levitte [Fri, 4 Mar 2016 14:41:42 +0000 (15:41 +0100)]
Have Configure display the value of SHARED_CFLAG

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoMake sure the effect of "pic" / "no-pic" is used with assembler compilations
Richard Levitte [Fri, 4 Mar 2016 14:36:07 +0000 (15:36 +0100)]
Make sure the effect of "pic" / "no-pic" is used with assembler compilations

Before the 'Introduce the "pic" / "no-pic" config option' commit, the
shared_cflag value for the chosen config would be part of the make
variable CFLAG, which got replicated into CFLAGS and ASFLAGS.

Since said commit, the shared_cflag value has become a make variable
of its own, SHARED_CFLAG (which is left empty in a "no-pic" build).

However, ASFLAGS was forgotten.  That's what's corrected with this
change.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoTouch the correct variables for the system; shlib_wrap.sh on Solaris
Richard Levitte [Wed, 9 Mar 2016 10:36:32 +0000 (11:36 +0100)]
Touch the correct variables for the system; shlib_wrap.sh on Solaris

If there is cause to think LD_LIBRARY_PATH_32 and LD_PRELOAD_32 are
appropriate variables to touch, do so.  Otherwise, touch the usual
LD_LIBRARY_PATH and LD_PRELOAD.  This covers for older installations
that don't have a mix of 32-bit and 64-bit libs.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoRecognise 32-bit Solaris in util/shlib_wrap.sh
Richard Levitte [Sun, 6 Mar 2016 21:36:57 +0000 (22:36 +0100)]
Recognise 32-bit Solaris in util/shlib_wrap.sh

Submitted by Erik Forsberg <erik@efca.com>

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoCheck gcc version to see if it supports -MM and friends
Richard Levitte [Tue, 8 Mar 2016 16:16:16 +0000 (17:16 +0100)]
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>
8 years agoAdd extra include directory for includers of ppc_arch.h
Richard Levitte [Tue, 8 Mar 2016 21:22:53 +0000 (22:22 +0100)]
Add extra include directory for includers of ppc_arch.h

crypto/evp/e_aes.c and crypto/modes/gcm128.c include ppc_arch.h, which
is located in crypto/, so add that as extra include directory for them.

Issue reported by Jeffrey Walton <noloader@gmail.com>

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoAdapt INSTALL and related notes for Windows
Richard Levitte [Tue, 8 Mar 2016 13:44:46 +0000 (14:44 +0100)]
Adapt INSTALL and related notes for Windows

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdapt appveyor.yml for the new unified build
Richard Levitte [Mon, 7 Mar 2016 18:18:42 +0000 (19:18 +0100)]
Adapt appveyor.yml for the new unified build

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdapt the Windows makefile template to source generation
Richard Levitte [Mon, 7 Mar 2016 13:12:45 +0000 (14:12 +0100)]
Adapt the Windows makefile template to source generation

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoDon't run the TLSProxy based tests in native Windows
Richard Levitte [Sat, 5 Mar 2016 18:59:30 +0000 (19:59 +0100)]
Don't run the TLSProxy based tests in native Windows

There are issues binding listening ports.  This may be analyzed more
thoroughly later on.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoUnified - name native Windows shared libraries like MingW builds do
Richard Levitte [Sat, 5 Mar 2016 19:02:05 +0000 (20:02 +0100)]
Unified - name native Windows shared libraries like MingW builds do

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoUnified - extract settings from util/pl/VC-32.pl and make the config settings
Richard Levitte [Wed, 2 Mar 2016 15:12:22 +0000 (16:12 +0100)]
Unified - extract settings from util/pl/VC-32.pl and make the config settings

This introduces the settings loutflag and aroutflag, because different
Windows tools that do the same thing have different ways to specify
the output file.

The Borland C++ config is commented away for the monent, perhaps
permanently.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoUnified - a native Windows makefile template
Richard Levitte [Wed, 2 Mar 2016 11:29:56 +0000 (12:29 +0100)]
Unified - a native Windows makefile template

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoec/asm/ecp_nistz256-sparcv9.pl: get corner logic right.
Andy Polyakov [Mon, 7 Mar 2016 22:50:01 +0000 (23:50 +0100)]
ec/asm/ecp_nistz256-sparcv9.pl: get corner logic right.

RT#4284

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdapt mk1mf.pl and companions to changed perlasm script semantics
Richard Levitte [Mon, 7 Mar 2016 23:33:08 +0000 (00:33 +0100)]
Adapt mk1mf.pl and companions to changed perlasm script semantics

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoUnified - adapt the generation of whirlpool assembler to use GENERATE
Richard Levitte [Mon, 7 Mar 2016 14:50:21 +0000 (15:50 +0100)]
Unified - adapt the generation of whirlpool assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/whrlpool/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoUnified - adapt the generation of sha assembler to use GENERATE
Richard Levitte [Mon, 7 Mar 2016 14:49:53 +0000 (15:49 +0100)]
Unified - adapt the generation of sha assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/sha/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoUnified - adapt the generation of rc4 assembler to use GENERATE
Richard Levitte [Mon, 7 Mar 2016 14:48:49 +0000 (15:48 +0100)]
Unified - adapt the generation of rc4 assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/rc4/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoUnified - adapt the generation of rc5 assembler to use GENERATE
Richard Levitte [Mon, 7 Mar 2016 14:49:09 +0000 (15:49 +0100)]
Unified - adapt the generation of rc5 assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/rc5/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoUnified - adapt the generation of ripemd assembler to use GENERATE
Richard Levitte [Mon, 7 Mar 2016 14:49:34 +0000 (15:49 +0100)]
Unified - adapt the generation of ripemd assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/ripemd/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoUnified - adapt the generation of md5 assembler to use GENERATE
Richard Levitte [Mon, 7 Mar 2016 14:47:35 +0000 (15:47 +0100)]
Unified - adapt the generation of md5 assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/md5/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoUnified - adapt the generation of modes assembler to use GENERATE
Richard Levitte [Mon, 7 Mar 2016 14:47:57 +0000 (15:47 +0100)]
Unified - adapt the generation of modes assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/modes/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>