oweals/openssl.git
8 years agoMake update to catch function renames.
Rich Salz [Fri, 11 Mar 2016 15:38:45 +0000 (10:38 -0500)]
Make update to catch function renames.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
8 years agoUse unsigned int instead of just unsigned.
Kurt Roeckx [Fri, 11 Mar 2016 00:19:43 +0000 (01:19 +0100)]
Use unsigned int instead of just unsigned.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoSave leaf_node and node_offset as character array
Kurt Roeckx [Fri, 11 Mar 2016 00:06:51 +0000 (01:06 +0100)]
Save leaf_node and node_offset as character array

They are not numbers in the machine byte order.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoReview comments
Kurt Roeckx [Wed, 9 Mar 2016 23:49:55 +0000 (00:49 +0100)]
Review comments

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdd blake2 support.
Bill Cox [Wed, 9 Mar 2016 22:08:31 +0000 (23:08 +0100)]
Add blake2 support.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agomove DSA_SIG definition into C source file
Dr. Stephen Henson [Thu, 10 Mar 2016 14:24:39 +0000 (14:24 +0000)]
move DSA_SIG definition into C source file

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agocrypto/*/build.info: make it work on ARM platforms.
Andy Polyakov [Fri, 11 Mar 2016 12:44:46 +0000 (13:44 +0100)]
crypto/*/build.info: make it work on ARM platforms.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agocrypto/*/build.info: SPARC-specific fixups.
Andy Polyakov [Fri, 11 Mar 2016 11:04:15 +0000 (12:04 +0100)]
crypto/*/build.info: SPARC-specific fixups.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoConfigurations/unix-Makefile.tmpl: don't leave empty .s files behind.
Andy Polyakov [Fri, 11 Mar 2016 10:55:44 +0000 (11:55 +0100)]
Configurations/unix-Makefile.tmpl: don't leave empty .s files behind.

If pre-processor failed, an empty .s file could be left behind,
which could get successfully compiled if one simply re-ran make
and cause linking failures. Not anymore. Remove even intermediate .S
in case of pre-processor failure.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoConfigure: remove dependency on 'head'.
Andy Polyakov [Fri, 11 Mar 2016 11:33:59 +0000 (12:33 +0100)]
Configure: remove dependency on 'head'.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoconstify CT_POLICY_EVAL_CTX getters
Rob Percival [Thu, 10 Mar 2016 23:26:41 +0000 (23:26 +0000)]
constify CT_POLICY_EVAL_CTX getters

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoSurround ctx_set_ctlog_list_file() with #ifndef OPENSSL_NO_CT
Rob Percival [Thu, 10 Mar 2016 23:10:02 +0000 (23:10 +0000)]
Surround ctx_set_ctlog_list_file() with #ifndef OPENSSL_NO_CT

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoSuppress CT warnings in test_ssl
Matt Caswell [Fri, 11 Mar 2016 13:50:55 +0000 (13:50 +0000)]
Suppress CT warnings in test_ssl

Running test_ssl with HARNESS_VERBOSE results in lots of spurious warnings
about an inability to load the CT config file. This fixes it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAvoid getting unresolved referense to bn_expand2 in test/bntest.c
Richard Levitte [Fri, 11 Mar 2016 10:38:14 +0000 (11:38 +0100)]
Avoid getting unresolved referense to bn_expand2 in test/bntest.c

Issue identified on Solaris by Erik Forsberg <erik@efca.com>

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoCall CONF_modules_free() before ENGINE_cleanup() in auto-deinit
Matt Caswell [Fri, 11 Mar 2016 09:52:52 +0000 (09:52 +0000)]
Call CONF_modules_free() before ENGINE_cleanup() in auto-deinit

During auto de-init we were calling ENGINE_cleanup(), and then later
CONF_modules_free(). However the latter function can end up calling
engine code, which can lead to a use of the global_engine_lock after it
has already been freed. Therefore we should swap the calling order of
these two functions.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFix no-rmd160 classic Windows build
Mat [Fri, 11 Mar 2016 03:52:32 +0000 (04:52 +0100)]
Fix no-rmd160 classic Windows build

no-ripemd was unified a while ago but the change was not done in mk1mf.pl. This commit changes the no-ripemd string to no-rmd160 which fixes the no-rmd160 classic build.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDon't build dynamic engines unless configured "shared"
Richard Levitte [Fri, 11 Mar 2016 11:58:15 +0000 (12:58 +0100)]
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>
8 years agoHarmonise the two methods to generate dependency files
Richard Levitte [Fri, 11 Mar 2016 08:26:49 +0000 (09:26 +0100)]
Harmonise the two methods to generate dependency files

One of them didn't clean away .d.tmp files properly.
The other would overwrite the .d files unconditionally, thereby
causing a possibly unnecessary dependency rebuild, which touches the
date of Makefile, which causes a possibly unnecessary rebuild of
buildinf.h and everything that depends on that.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoMore tweaks to the installation instructions
Matt Caswell [Thu, 10 Mar 2016 11:05:47 +0000 (11:05 +0000)]
More tweaks to the installation instructions

A few things were out of date and a few things were missing. Also some
formatting updates.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix some assembler generating scripts for better unification
Richard Levitte [Thu, 10 Mar 2016 23:49:47 +0000 (00:49 +0100)]
Fix some assembler generating scripts for better unification

Some of these scripts would recognise an output parameter if it looks
like a file path.  That works both in both the classic and new build
schemes.  Some fo these scripts would only recognise it if it's a
basename (i.e. no directory component).  Those need to be corrected,
as the output parameter in the new build scheme is more likely to
contain a directory component than not.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoAdd include directory options for assembler files that include from crypto/
Richard Levitte [Thu, 10 Mar 2016 20:55:12 +0000 (21:55 +0100)]
Add include directory options for assembler files that include from crypto/

A few were missed in the previous commit.

Closes RT#4412

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agocheck reviewer --reviewer=emilia
Rob Percival [Thu, 10 Mar 2016 19:49:34 +0000 (19:49 +0000)]
check reviewer --reviewer=emilia
Use SSL_get_SSL_CTX instead of passing SSL_CTX to s_client.c:print_stuff

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agocheck reviewer --reviewer=emilia
Rob Percival [Thu, 10 Mar 2016 18:21:40 +0000 (18:21 +0000)]
check reviewer --reviewer=emilia
Pass entire CTLOG_STORE to SCT_print, rather than just the SCT's CTLOG

SCT_print now looks up the correct CT log for you.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agocheck reviewer --reviewer=emilia
Rob Percival [Thu, 10 Mar 2016 18:17:23 +0000 (18:17 +0000)]
check reviewer --reviewer=emilia
Remove 'log' field from SCT and related accessors

In order to still have access to an SCT's CTLOG when calling SCT_print,
SSL_CTX_get0_ctlog_store has been added.

Improved documentation for some CT functions in openssl/ssl.h.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdd include directory options for assembler files that include from crypto/
Richard Levitte [Thu, 10 Mar 2016 19:05:52 +0000 (20:05 +0100)]
Add include directory options for assembler files that include from crypto/

Closes RT#4406

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoIn the recipe using "makedepend", make sure the object file extension is there
Richard Levitte [Thu, 10 Mar 2016 18:34:21 +0000 (19:34 +0100)]
In the recipe using "makedepend", make sure the object file extension is there

Reviewed-by: Stephen Henson <steve@openssl.org>
8 years agoConfigure - don't trust $1 to stick around, save its value away
Richard Levitte [Thu, 10 Mar 2016 18:33:11 +0000 (19:33 +0100)]
Configure - don't trust $1 to stick around, save its value away

Reviewed-by: Stephen Henson <steve@openssl.org>
8 years agoFix a memory leak in the afalg engine
Matt Caswell [Thu, 10 Mar 2016 15:17:20 +0000 (15:17 +0000)]
Fix a memory leak in the afalg engine

The AFALG engine created a global EVP_CIPHER instance but was not freeing
it up when the engine was destroyed.

Reviewed-by: Rich Salz <rsalz@openssl.org>
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>