oweals/openssl.git
8 years agoPrepare for 1.1.0-pre5 release OpenSSL_1_1_0-pre5
Matt Caswell [Tue, 19 Apr 2016 14:57:51 +0000 (15:57 +0100)]
Prepare for 1.1.0-pre5 release

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoUnsigned chars can't be negative
Matt Caswell [Mon, 18 Apr 2016 14:12:58 +0000 (15:12 +0100)]
Unsigned chars can't be negative

Fix a problem where an unsigned char was being checked to see if it was
negative.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix PKCS7 memory leak
Matt Caswell [Mon, 18 Apr 2016 09:35:34 +0000 (10:35 +0100)]
Fix PKCS7 memory leak

Commit f0e0fd51f was a bit over-zealous in removing a call to
X509_STORE_CTX_cleanup(). The call in question was in a loop and was
required to cleanup resources used on each iteration of the loop. Removing
this resulted in a memory leak.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoMake string_to_hex/hex_to_string public
Rich Salz [Wed, 13 Apr 2016 19:58:28 +0000 (15:58 -0400)]
Make string_to_hex/hex_to_string public

Give the API new names, document it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRename some lowercase API's
Rich Salz [Mon, 18 Apr 2016 11:43:54 +0000 (07:43 -0400)]
Rename some lowercase API's

Make OBJ_name_cmp internal
Rename idea_xxx to IDEA_xxx
Rename get_rfc_xxx to BN_get_rfc_xxx
Rename v3_addr and v3_asid functions to X509v3_...

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoNOTES files will contain more requirements, make that explicit
Richard Levitte [Mon, 18 Apr 2016 11:49:41 +0000 (13:49 +0200)]
NOTES files will contain more requirements, make that explicit

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoHaiku x86-64 doesn't need RC4_CHAR.
Jérôme Duval [Sun, 17 Apr 2016 14:36:30 +0000 (16:36 +0200)]
Haiku x86-64 doesn't need RC4_CHAR.

* add a comment about Haiku being built with no-asm.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFree methods on destroy.
Ben Laurie [Sat, 16 Apr 2016 04:37:04 +0000 (05:37 +0100)]
Free methods on destroy.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFree engine on error.
Ben Laurie [Sat, 16 Apr 2016 04:33:24 +0000 (05:33 +0100)]
Free engine on error.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoOpacity.
Ben Laurie [Fri, 15 Apr 2016 08:45:47 +0000 (09:45 +0100)]
Opacity.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoSigned/unsigned compare.
Ben Laurie [Fri, 15 Apr 2016 08:45:25 +0000 (09:45 +0100)]
Signed/unsigned compare.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoRestore OCSP_basic_verify() error return semantics
Richard Levitte [Sun, 17 Apr 2016 11:48:53 +0000 (13:48 +0200)]
Restore OCSP_basic_verify() error return semantics

Recently, OCSP_basic_verify() was changed to always return 0 on error,
when it would previously return 0 on error and < 0 on fatal error.
This restores the previous semantics back.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoRemove declaration of function that isn't implemented
Richard Levitte [Sun, 17 Apr 2016 11:21:06 +0000 (13:21 +0200)]
Remove declaration of function that isn't implemented

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdd X509_STORE_CTX_set0_untrusted function.
Dr. Stephen Henson [Sat, 16 Apr 2016 17:23:19 +0000 (18:23 +0100)]
Add X509_STORE_CTX_set0_untrusted function.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoSmall OCSP fixup
Richard Levitte [Sat, 16 Apr 2016 10:57:09 +0000 (12:57 +0200)]
Small OCSP fixup

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Stephen Henson <steve@openssl.org>
8 years agoMake many X509_xxx types opaque.
Rich Salz [Fri, 15 Apr 2016 03:59:26 +0000 (23:59 -0400)]
Make many X509_xxx types opaque.

Make X509_OBJECT, X509_STORE_CTX, X509_STORE, X509_LOOKUP,
and X509_LOOKUP_METHOD opaque.
Remove unused X509_CERT_FILE_CTX

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
8 years agoDon't use a default for --with-zlib-lib on Windows with option 'zlib'
Richard Levitte [Fri, 15 Apr 2016 07:17:13 +0000 (09:17 +0200)]
Don't use a default for --with-zlib-lib on Windows with option 'zlib'

To begin with, the default should have been the import library, not
the DLL itself.  However, we don't know what directory it's installed
in either way, so we may as well demand the full path from the user

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoex_libs settings have to be added to, not overriden, on Windows too
Richard Levitte [Fri, 15 Apr 2016 05:53:17 +0000 (07:53 +0200)]
ex_libs settings have to be added to, not overriden, on Windows too

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoUpdate Travis and Appveyor for change to shared by default
Matt Caswell [Thu, 14 Apr 2016 13:28:13 +0000 (14:28 +0100)]
Update Travis and Appveyor for change to shared by default

Update the Travis and Appveyor builds to explicitly state no-shared where
applicable.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoMake "shared" builds the default
Matt Caswell [Thu, 14 Apr 2016 13:16:52 +0000 (14:16 +0100)]
Make "shared" builds the default

In most cases we expect that people will be using shared libraries not
static ones, therefore we make that the default.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix ex_data locks issue
Matt Caswell [Thu, 14 Apr 2016 20:28:54 +0000 (21:28 +0100)]
Fix ex_data locks issue

Travis identified a problem with freeing the ex_data locks which wasn't
quite right in ff2344052. Trying to fix it identified a further problem:
the ex_data locks are cleaned up by OPENSSL_cleanup(), which is called
explicitly by CRYPTO_mem_leaks(), but then later the BIO passed to
CRYPTO_mem_leaks() is freed. An attempt is then made to use the ex_data
lock already freed.

Reviewed-by: Tim Hudson <tjh@openssl.org>
8 years agoAdd Haiku support.
Jérôme Duval [Tue, 23 Feb 2016 21:49:01 +0000 (22:49 +0100)]
Add Haiku support.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFix installation on VMS for no-stdio and no-autoalginit
Richard Levitte [Thu, 14 Apr 2016 15:07:37 +0000 (16:07 +0100)]
Fix installation on VMS for no-stdio and no-autoalginit

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFix installation for no-stdio and no-autoalginit
Richard Levitte [Thu, 14 Apr 2016 15:04:56 +0000 (16:04 +0100)]
Fix installation for no-stdio and no-autoalginit

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFix no-stdio and no-autoalginit
Matt Caswell [Thu, 14 Apr 2016 12:44:15 +0000 (13:44 +0100)]
Fix no-stdio and no-autoalginit

no-stdio does not work with the apps. Since the tests also need the apps
it doesn't support that either. Therefore we disable building of both.

no-autoalginit is not compatible with the apps because it requires explicit
loading of the algorithms, and the apps don't do that. Therefore we disable
building the apps for this option. Similarly the tests depend on the apps
so we also disable the tests. Finally the whole point about no-autoalginit
is to avoid excessive executable sizes when doing static linking. Therefore
we disable "shared" if this option is selected.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoThe err_cleanup() funtion is internal so shouldn't be exported
Matt Caswell [Thu, 14 Apr 2016 12:37:41 +0000 (13:37 +0100)]
The err_cleanup() funtion is internal so shouldn't be exported

Running a "make update" wanted to add err_cleanup to libcrypto.num which
is wrong.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoWrite POD page.
Rich Salz [Mon, 11 Apr 2016 14:17:38 +0000 (10:17 -0400)]
Write POD page.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAdd SSL_SESSION_get0_hostname()
Lyon Chen [Mon, 11 Apr 2016 14:08:00 +0000 (10:08 -0400)]
Add SSL_SESSION_get0_hostname()

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoEnsure all locks are properly cleaned up
Matt Caswell [Fri, 11 Mar 2016 21:53:18 +0000 (21:53 +0000)]
Ensure all locks are properly cleaned up

Some locks were not being properly cleaned up during close down.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix the spelling of "implement".
Shlomi Fish [Wed, 13 Apr 2016 20:43:07 +0000 (23:43 +0300)]
Fix the spelling of "implement".

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFix AFALG kernel and headers mismatch problem
Matt Caswell [Wed, 13 Apr 2016 22:26:56 +0000 (23:26 +0100)]
Fix AFALG kernel and headers mismatch problem

During Configure we attempt to check the kernel version of this platform
to see whether we can compile the AFALG engine. If the kernel version
looks recent enough then we enable AFALG. However when we compile
e_afalg.c we check the version of the linux headers. If there is a
mismatch between the linux headers and the currently running kernel then
we don't compile the AFLAG engine and continue. This was causing a link
error.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoBugfix: in asn1parse avoid erroneous len after a sub-sequence
Viktor Dukhovni [Thu, 14 Apr 2016 03:14:43 +0000 (23:14 -0400)]
Bugfix: in asn1parse avoid erroneous len after a sub-sequence

Introduced in:

    commit 79c7f74d6cefd5d32fa20e69195ad3de834ce065
    Author: Ben Laurie <ben@links.org>
    Date:   Tue Mar 29 19:37:57 2016 +0100

    Fix buffer overrun in ASN1_parse().

Problem input:

    https://tools.ietf.org/html/draft-ietf-curdle-pkix-eddsa-00#section-8.1
    -----BEGIN PUBLIC KEY-----
    MC0wCAYDK2VkCgECAyEAGb9ECWmEzf6FQbrBZ9w7lshQhqowtrbLDFw4rXAxZuE=
    -----END PUBLIC KEY-----

Previously:

        0:d=0  hl=2 l=  45 cons: SEQUENCE
        2:d=1  hl=2 l=   8 cons: SEQUENCE
        4:d=2  hl=2 l=   3 prim: OBJECT            :1.3.101.100
        9:d=2  hl=2 l=   1 prim: ENUMERATED        :02
    Error in encoding
    140735164989440:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:../openssl/crypto/asn1/asn1_lib.c:148:

Now:

    0:d=0  hl=2 l=  45 cons: SEQUENCE
    2:d=1  hl=2 l=   8 cons: SEQUENCE
    4:d=2  hl=2 l=   3 prim: OBJECT            :1.3.101.100
    9:d=2  hl=2 l=   1 prim: ENUMERATED        :02
   12:d=1  hl=2 l=  33 prim: BIT STRING
      0000 - 00 19 bf 44 09 69 84 cd-fe 85 41 ba c1 67 dc 3b   ...D.i....A..g.;
      0010 - 96 c8 50 86 aa 30 b6 b6-cb 0c 5c 38 ad 70 31 66   ..P..0....\8.p1f
      0020 - e1                                                .

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDon't use deprecated CONF_modules_free() in tests
Viktor Dukhovni [Thu, 14 Apr 2016 03:41:55 +0000 (23:41 -0400)]
Don't use deprecated CONF_modules_free() in tests

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agomake update
Matt Caswell [Wed, 13 Apr 2016 20:26:24 +0000 (21:26 +0100)]
make update

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAdd a CHANGES entry for removal of Configure options
Matt Caswell [Wed, 13 Apr 2016 20:05:50 +0000 (21:05 +0100)]
Add a CHANGES entry for removal of Configure options

Document removal of no-aes, no-hmac, no-rsa, no-sha and no-md5.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoUpdate INSTALL file based on feedback
Matt Caswell [Wed, 13 Apr 2016 20:01:28 +0000 (21:01 +0100)]
Update INSTALL file based on feedback

Update the config options documentation based on feedback.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoUpdate the INSTALL instructions with lots of options
Matt Caswell [Wed, 13 Apr 2016 14:04:01 +0000 (15:04 +0100)]
Update the INSTALL instructions with lots of options

There were a lot of options missing from INSTALL. This adds descriptions
for them.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRemove OPENSSL_NO_HMAC
Matt Caswell [Wed, 13 Apr 2016 10:31:51 +0000 (11:31 +0100)]
Remove OPENSSL_NO_HMAC

no-hmac is no longer an option so remove OPENSSL_NO_HMAC guards.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRemove OPENSSL_NO_SHA guards
Matt Caswell [Wed, 13 Apr 2016 10:31:00 +0000 (11:31 +0100)]
Remove OPENSSL_NO_SHA guards

no-sha is no longer an option so remove OPENSSL_NO_SHA guards.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRemove OPENSSL_NO_AES guards
Matt Caswell [Wed, 13 Apr 2016 10:28:45 +0000 (11:28 +0100)]
Remove OPENSSL_NO_AES guards

no-aes is no longer a Configure option and therefore the OPENSSL_NO_AES
guards can be removed.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRemove no-aes, no-rsa, no-sha, no-md5 and no-hmac
Matt Caswell [Wed, 13 Apr 2016 09:46:15 +0000 (10:46 +0100)]
Remove no-aes, no-rsa, no-sha, no-md5 and no-hmac

These algorithms are fundamental and extensively used. The "no-" options
do not work either in 1.1.0 or in other released branches. Therefore the
ability to disable them should be removed.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoNeed err_load_crypto_strings_int declared.
Rich Salz [Wed, 13 Apr 2016 19:54:16 +0000 (15:54 -0400)]
Need err_load_crypto_strings_int declared.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agomake update
Dr. Stephen Henson [Wed, 13 Apr 2016 14:08:27 +0000 (15:08 +0100)]
make update

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoRemove check_defer()
Dr. Stephen Henson [Wed, 13 Apr 2016 11:11:59 +0000 (12:11 +0100)]
Remove check_defer()

The check_defer() function was used to ensure that EVP_cleanup() was always
called before OBJ_cleanup(). The new cleanup code ensures this so it is
no longer needed.

Remove obj_cleanup() call in OID config module: it is not needed
any more either.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoRename internal symbol to follow internal naming pattern
Richard Levitte [Wed, 13 Apr 2016 13:00:32 +0000 (15:00 +0200)]
Rename internal symbol to follow internal naming pattern

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoCleanup libcrypto.num and make update
Richard Levitte [Wed, 13 Apr 2016 11:57:46 +0000 (13:57 +0200)]
Cleanup libcrypto.num and make update

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoMove a declaration that's private to libcrypto
Richard Levitte [Wed, 13 Apr 2016 11:53:27 +0000 (13:53 +0200)]
Move a declaration that's private to libcrypto

Don't expose purely libcrypto internal symbols, even to libssl.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoPPC assebmly pack: initial POWER9 support tidbits.
Andy Polyakov [Mon, 11 Apr 2016 22:09:47 +0000 (00:09 +0200)]
PPC assebmly pack: initial POWER9 support tidbits.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agochacha/asm/chacha-armv8.pl: fix intermittent build failures.
Andy Polyakov [Mon, 11 Apr 2016 12:06:16 +0000 (14:06 +0200)]
chacha/asm/chacha-armv8.pl: fix intermittent build failures.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDon't use FORMAT_BASE64 format when compressing / decompressing
Richard Levitte [Wed, 13 Apr 2016 00:40:39 +0000 (02:40 +0200)]
Don't use FORMAT_BASE64 format when compressing / decompressing

When compressing, the output / input is a binary format, not a text
format like BASE64.  This is important on Windows, where a ^Z in a
text file is seen as EOF, and there could be a ^Z somewhere in a
compressed file, cutting it short as input.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFix the handling of --with-zlib-include
Richard Levitte [Tue, 12 Apr 2016 14:35:32 +0000 (16:35 +0200)]
Fix the handling of --with-zlib-include

The handling was Unix centric, already in Configure.  Change that to
just collect the value and let the build file templates figure out
what to do with it.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoRemake the way dynamic zlib is loaded
Richard Levitte [Tue, 12 Apr 2016 14:12:53 +0000 (16:12 +0200)]
Remake the way dynamic zlib is loaded

Instead of absolute hard coding of the libz library name, have it use
the macro LIBZ, which is set to defaults we know in case it's
undefined.

This allows our configuration to set something that's sane on current
or older platforms, and allows the user to override it by defining
LIBZ themselves.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoConfiguration: Simplify the way vms information is retrieved
Richard Levitte [Tue, 12 Apr 2016 14:03:02 +0000 (16:03 +0200)]
Configuration: Simplify the way vms information is retrieved

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFix zlib configuration options.
Richard Levitte [Tue, 12 Apr 2016 13:28:06 +0000 (15:28 +0200)]
Fix zlib configuration options.

The macros ZLIB and ZLIB_SHARED weren't appropriately defined,
deviating wrongly from how they worked in earlier OpenSSL versions.
So, restore it so that ZLIB is defined if configured "enable-zlib" and
so that ZLIB and ZLIB_SHARED are defined if configured
"enable-zlib-dynamic".

Additionally, correct the interpretation of the --with-zlib-lib value
on Windows and VMS, where it's used to indicate the actual zlib
zlib library file / logical name, as that can differ depending on zlib
version and packaging on those platforms.

Finally for Windows and VMS, we also define the macro LIBZ with that
file name / logical name when configured "zlib-dynamic", so the
compression unit can pick it up and use it.

Reviewed-by: Matt Caswell <matt@openssl.org>
8 years agoFix no-tls1_1 and no-tls1_2
Matt Caswell [Tue, 12 Apr 2016 07:53:31 +0000 (08:53 +0100)]
Fix no-tls1_1 and no-tls1_2

The above config options were failing in test_ssl_old.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRename int_*() functions to *_int()
Matt Caswell [Tue, 12 Apr 2016 11:20:16 +0000 (12:20 +0100)]
Rename int_*() functions to *_int()

There is a preference for suffixes to indicate that a function is internal
rather than prefixes. Note: the suffix is only required to disambiguate
internal functions and public symbols with the same name (but different
case)

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoTweak to documentation
Matt Caswell [Tue, 12 Apr 2016 10:49:40 +0000 (11:49 +0100)]
Tweak to documentation

Tweak to documentation following feedback

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoMisc fix ups to deprecate explicit de-init documentation
Matt Caswell [Wed, 6 Apr 2016 10:13:25 +0000 (11:13 +0100)]
Misc fix ups to deprecate explicit de-init documentation

Documentation fix ups as a result of feedback received.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix explicit de-init macros
Matt Caswell [Wed, 6 Apr 2016 10:12:12 +0000 (11:12 +0100)]
Fix explicit de-init macros

The no-op de-init macros may fail because of extraneous ";", so we use
a slightly different construct instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix symbols missing from shared build
Matt Caswell [Wed, 6 Apr 2016 09:50:05 +0000 (10:50 +0100)]
Fix symbols missing from shared build

libssl needs to have access to some internal libcrypto symbols.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoRename lots of *_intern or *_internal function to int_*
Matt Caswell [Wed, 6 Apr 2016 09:39:00 +0000 (10:39 +0100)]
Rename lots of *_intern or *_internal function to int_*

There was a lot of naming inconsistency, so we try and standardise on
one form.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAdd a CHANGES entry for the deprecated cleanup functions
Matt Caswell [Mon, 4 Apr 2016 16:12:58 +0000 (17:12 +0100)]
Add a CHANGES entry for the deprecated cleanup functions

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agomake update
Matt Caswell [Mon, 4 Apr 2016 16:05:21 +0000 (17:05 +0100)]
make update

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate CONF_modules_free() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 16:00:04 +0000 (17:00 +0100)]
Deprecate CONF_modules_free() and make it a no-op

CONF_modules_free() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate ENGINE_cleanup() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 15:12:39 +0000 (16:12 +0100)]
Deprecate ENGINE_cleanup() and make it a no-op

ENGINE_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate OBJ_cleanup() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 14:49:21 +0000 (15:49 +0100)]
Deprecate OBJ_cleanup() and make it a no-op

OBJ_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate EVP_cleanup() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 14:28:58 +0000 (15:28 +0100)]
Deprecate EVP_cleanup() and make it a no-op

EVP_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate BIO_sock_cleanup() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 13:53:37 +0000 (14:53 +0100)]
Deprecate BIO_sock_cleanup() and make it a no-op

BIO_sock_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate CRYPTO_cleanup_all_ex_data() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 13:38:45 +0000 (14:38 +0100)]
Deprecate CRYPTO_cleanup_all_ex_data() and make it a no-op

CRYPTO_cleanup_all_ex_data() should not be called expicitly - we should
leave auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate RAND_cleanup() and make it a no-op
Matt Caswell [Wed, 6 Apr 2016 10:19:55 +0000 (11:19 +0100)]
Deprecate RAND_cleanup() and make it a no-op

RAND_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix conditional compile logic in speed.c
Matt Caswell [Wed, 6 Apr 2016 10:17:44 +0000 (11:17 +0100)]
Fix conditional compile logic in speed.c

The conditional compile logic wasn't quite right in speed.c for when
both OPENSSL_NO_DSA and OPENSSL_NO_EC are defined.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate SSL_COMP_free_compression_methods() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 12:53:35 +0000 (13:53 +0100)]
Deprecate SSL_COMP_free_compression_methods() and make it a no-op

SSL_COMP_free_compression_methods() should not be called expicitly - we
should leave auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate ERR_free_strings() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 12:43:58 +0000 (13:43 +0100)]
Deprecate ERR_free_strings() and make it a no-op

ERR_free_strings() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDeprecate COMP_zlib_cleanup() and make it a no-op
Matt Caswell [Mon, 4 Apr 2016 16:19:06 +0000 (17:19 +0100)]
Deprecate COMP_zlib_cleanup() and make it a no-op

COMP_zlib_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoX509_PUBKEY docs
Dr. Stephen Henson [Wed, 23 Mar 2016 00:07:52 +0000 (00:07 +0000)]
X509_PUBKEY docs

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
8 years agoFix setting of debug callback in apps/enc.c
Richard Levitte [Wed, 13 Apr 2016 00:43:45 +0000 (02:43 +0200)]
Fix setting of debug callback in apps/enc.c

Setting the debug callback on the in and out BIOs were done too early.
No debug callback was set on the zlib filter BIO.

Reviewed-by: Tim Hudson <tjh@openssl.org>
8 years agoAdd SSL_CTX_get_ciphers()
Kazuki Yamaguchi [Sun, 10 Apr 2016 04:18:50 +0000 (13:18 +0900)]
Add SSL_CTX_get_ciphers()

Add an accessor for SSL_CTX.

Since libssl was made opaque, there is no way for users to access the
cipher_list, while users can set the cipher_list by
SSL_CTX_set_cipher_list().

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFix the no-posix-io option
Matt Caswell [Mon, 11 Apr 2016 12:59:31 +0000 (13:59 +0100)]
Fix the no-posix-io option

Fix a compile failure with no-posix-io

Reviewed-by: Tim Hudson <tjh@openssl.org>
8 years agoRemove an unused function
Matt Caswell [Mon, 11 Apr 2016 12:46:11 +0000 (13:46 +0100)]
Remove an unused function

The function pqueue_print is not exported and is never called. Therefore
we should delete it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoFix the no-tls option
Matt Caswell [Mon, 11 Apr 2016 12:39:45 +0000 (13:39 +0100)]
Fix the no-tls option

The no-tls option was failing in the tests. This fixes it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix the no-nextprotoneg option
Matt Caswell [Mon, 11 Apr 2016 10:41:19 +0000 (11:41 +0100)]
Fix the no-nextprotoneg option

Misc fixes to get no-nextprotoneg config option working again.

Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoBIO: respect opening in text mode
Richard Levitte [Fri, 8 Apr 2016 18:15:15 +0000 (20:15 +0200)]
BIO: respect opening in text mode

When a file is opened with BIO_new_file(), make sure that the internal
mode TEXT vs BINARY setting reflects what's given in the mode string.

Reviewed-by: Andy Polyakov <appro@openssl.org>
8 years agoDisable some sanitizer checks without PEDANTIC
Emilia Kasper [Fri, 8 Apr 2016 16:55:28 +0000 (18:55 +0200)]
Disable some sanitizer checks without PEDANTIC

Code without PEDANTIC has intentional "undefined" behaviour. To get best
coverage for both PEDANTIC and non-PEDANTIC codepaths, run the sanitizer
builds in two different configurations:
1) Without PEDANTIC but with alignment checks disabled.
2) With PEDANTIC.

To not overload Travis too much, run one build with clang and the other
with gcc (chosen at random).

Also remove a micro-optimization in CAST code to be able to
-fsanitize=shift. Whether shift sanitization is meaningful for crypto or
an obstacle is debatable but since this appears to be the only offender,
we might as well keep the check for now.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix warnings exposed by clang-3.8
Emilia Kasper [Fri, 8 Apr 2016 14:19:00 +0000 (16:19 +0200)]
Fix warnings exposed by clang-3.8

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAdjust --strict-warnings builds in Travis
Emilia Kasper [Tue, 5 Apr 2016 13:11:02 +0000 (15:11 +0200)]
Adjust --strict-warnings builds in Travis

In Travis, do --strict-warnings on BUILDONLY configurations. This
ensures that the tests run even if --strict-warnings fail, and avoids
hiding unrelated test failures.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoDon't check the generated ssl-tests configs on VMS
Richard Levitte [Sat, 9 Apr 2016 09:15:16 +0000 (11:15 +0200)]
Don't check the generated ssl-tests configs on VMS

The simple reason is that the pre-generated files are mainly for Unix.
The VMS variants look slightly different, so comparing will always fail.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
8 years agoVMS doesn't have directory separators in the same sense as Unix
Richard Levitte [Sat, 9 Apr 2016 09:13:00 +0000 (11:13 +0200)]
VMS doesn't have directory separators in the same sense as Unix

Don't add / in file specs on VMS.  The directory "separator" is part
of the directory spec.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
8 years agoRSA: the docs still talk about RSA_PKCS1_SSLeay
Beat Bolli [Thu, 7 Apr 2016 21:32:59 +0000 (23:32 +0200)]
RSA: the docs still talk about RSA_PKCS1_SSLeay

Rename the function to RSA_PKCS1_OpenSSL.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
8 years agoAdd CHANGES entry for DH and DH_METHOD opacity
Matt Caswell [Thu, 7 Apr 2016 14:47:28 +0000 (15:47 +0100)]
Add CHANGES entry for DH and DH_METHOD opacity

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAdd documentation for following DH and DH_METHOD opacity
Matt Caswell [Thu, 7 Apr 2016 14:24:23 +0000 (15:24 +0100)]
Add documentation for following DH and DH_METHOD opacity

A number of new functions have been added following the DH and DH_METHOD
opacity commits. This commit provides documentation for those functions.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoFix double free bug in error path
Matt Caswell [Thu, 7 Apr 2016 13:08:52 +0000 (14:08 +0100)]
Fix double free bug in error path

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agomake update
Matt Caswell [Thu, 7 Apr 2016 12:48:03 +0000 (13:48 +0100)]
make update

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoMake DH_METHOD opaque
Matt Caswell [Thu, 7 Apr 2016 12:47:20 +0000 (13:47 +0100)]
Make DH_METHOD opaque

Move the dh_method structure into an internal header file and provide
relevant accessors for the internal fields.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agomake update
Matt Caswell [Wed, 6 Apr 2016 16:50:22 +0000 (17:50 +0100)]
make update

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoMake DH opaque
Matt Caswell [Wed, 6 Apr 2016 16:49:48 +0000 (17:49 +0100)]
Make DH opaque

Move the dh_st structure into an internal header file and provide
relevant accessors for the internal fields.

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoAdd SSL_DANE typedef for consistency.
Rich Salz [Fri, 8 Apr 2016 13:10:06 +0000 (09:10 -0400)]
Add SSL_DANE typedef for consistency.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
8 years agoAdd OCSP to mkdef
Rich Salz [Fri, 8 Apr 2016 12:02:41 +0000 (08:02 -0400)]
Add OCSP to mkdef

Reviewed-by: Richard Levitte <levitte@openssl.org>
8 years agoPPC assembly pack: remove branch hints.
Andy Polyakov [Thu, 31 Mar 2016 16:47:17 +0000 (18:47 +0200)]
PPC assembly pack: remove branch hints.

As it turns out branch hints grew as kind of a misconception. In
addition their interpretation by GNU assembler is affected by
assembler flags and can end up with opposite meaning on different
processors. As we have to loose quite a lot on misinterprerations,
especially on newer processors, we just omit them altogether.

Reviewed-by: Tim Hudson <tjh@openssl.org>
8 years agoClean-up *_DEBUG options.
Andy Polyakov [Wed, 6 Apr 2016 10:47:35 +0000 (12:47 +0200)]
Clean-up *_DEBUG options.

Since NDEBUG is defined unconditionally on command line for release
builds, we can omit *_DEBUG options in favour of effective "all-on"
in debug builds exercised though CI.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
8 years agoConfigurations/10-main.conf: omit now redundant -D_WINDLL.
Andy Polyakov [Wed, 6 Apr 2016 15:33:03 +0000 (17:33 +0200)]
Configurations/10-main.conf: omit now redundant -D_WINDLL.

... and refine /MT vs. /MD flag handling.

Reviewed-by: Richard Levitte <levitte@openssl.org>