oweals/openssl.git
9 years agoRename gost2814789t.c to gost2814789test.c. The old name caused problems
Matt Caswell [Wed, 19 Nov 2014 14:07:36 +0000 (14:07 +0000)]
Rename gost2814789t.c to gost2814789test.c. The old name caused problems
for dummytest if gost is compiled out, since the name of the test is not
standard (dummytest segfaults). Also the old name caused problems for git
because the executable was not in the .gitignore file

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoAdd missing OPENSSL_NO_EC guards
Matt Caswell [Tue, 18 Nov 2014 17:16:57 +0000 (17:16 +0000)]
Add missing OPENSSL_NO_EC guards

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoAdd OPENSSL_NO_ECDH guards
Matt Caswell [Tue, 18 Nov 2014 16:54:07 +0000 (16:54 +0000)]
Add OPENSSL_NO_ECDH guards

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoRemove extraneous white space, and add some braces
Matt Caswell [Mon, 15 Dec 2014 20:48:33 +0000 (20:48 +0000)]
Remove extraneous white space, and add some braces

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoDTLS fixes for signed/unsigned issues
Matt Caswell [Fri, 12 Dec 2014 15:32:24 +0000 (15:32 +0000)]
DTLS fixes for signed/unsigned issues

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoRT3497: The ticket that keeps on giving.
Rich Salz [Mon, 15 Dec 2014 17:24:25 +0000 (12:24 -0500)]
RT3497: The ticket that keeps on giving.

Don't remove c_rehash that wasn't created by make; this script
is created by configure.

This fix brought to you by the letter "f" and
Reviewed-by: Emilia Kasper <emilia@openssl.org>
9 years agoAllow using -SSLv2 again when setting Protocol in the config.
Kurt Roeckx [Wed, 10 Dec 2014 12:38:57 +0000 (13:38 +0100)]
Allow using -SSLv2 again when setting Protocol in the config.

RT#3625

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoRT3497: Fix; don't remove header files
Rich Salz [Mon, 15 Dec 2014 14:18:11 +0000 (09:18 -0500)]
RT3497: Fix; don't remove header files

Doing 'config ; make clean' broke because clean removed
header files that normal build didn't create.  So don't
remove those files.  Hopefully will be better addressed by
Geoff's no-symlinks patch.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix unused variable warning
Emilia Kasper [Fri, 12 Dec 2014 16:45:46 +0000 (17:45 +0100)]
Fix unused variable warning

The temporary variable causes unused variable warnings in opt mode with clang,
because the subsequent assert is compiled out.

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoFixed memory leak if BUF_MEM_grow fails
Matt Caswell [Fri, 12 Dec 2014 11:03:00 +0000 (11:03 +0000)]
Fixed memory leak if BUF_MEM_grow fails

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
9 years agoRT1688: Add dependencies for parallel make
Rich Salz [Fri, 12 Dec 2014 18:17:51 +0000 (13:17 -0500)]
RT1688: Add dependencies for parallel make

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
9 years agomake update
Matt Caswell [Thu, 11 Dec 2014 23:33:10 +0000 (23:33 +0000)]
make update

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMinor doc fixes.
Rich Salz [Thu, 11 Dec 2014 22:05:57 +0000 (17:05 -0500)]
Minor doc fixes.

In EVP_EncryptInit remove duplicate mention of EVP_idea_cbc()
In EVP_PKEY_CTX_ctrl.pod remove EVP_PKEY_get_default_digest_nid
since it is documented elsewhere.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRT3497: Clean up "dclean" targets
Rich Salz [Thu, 11 Dec 2014 22:01:16 +0000 (17:01 -0500)]
RT3497: Clean up "dclean" targets

Some Makefiles had actions for "dclean" that really belonged
to the "clean" target.  This is wrong because clean ends up,
well, not really cleaning everything.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRT3543: Remove #ifdef LINT
Rich Salz [Tue, 23 Sep 2014 17:23:09 +0000 (13:23 -0400)]
RT3543: Remove #ifdef LINT

I also replaced some exit/return wrappers in various
programs (from main) to standardize on return.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRemove old private pod2man
Rich Salz [Wed, 10 Dec 2014 22:10:59 +0000 (17:10 -0500)]
Remove old private pod2man

Include Richard's point to remove the 'sh -c' wrapper

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agocapi_ctrl, capi_vtrace: check for NULL after allocating and free it
Kurt Roeckx [Mon, 9 Dec 2013 21:03:34 +0000 (22:03 +0100)]
capi_ctrl, capi_vtrace: check for NULL after allocating and free it

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agotree_print: check for NULL after allocating err
Jonas Maebe [Mon, 9 Dec 2013 21:02:35 +0000 (22:02 +0100)]
tree_print: check for NULL after allocating err

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agotls1_heartbeat: check for NULL after allocating buf
Jonas Maebe [Mon, 9 Dec 2013 16:21:43 +0000 (17:21 +0100)]
tls1_heartbeat: check for NULL after allocating buf

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agotls1_process_heartbeat: check for NULL after allocating buffer
Jonas Maebe [Sun, 7 Dec 2014 16:38:51 +0000 (17:38 +0100)]
tls1_process_heartbeat: check for NULL after allocating buffer

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoSSL_set_session: check for NULL after allocating s->kssl_ctx->client_princ
Jonas Maebe [Mon, 9 Dec 2013 16:02:44 +0000 (17:02 +0100)]
SSL_set_session: check for NULL after allocating s->kssl_ctx->client_princ

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoserverinfo_process_buffer: check result of realloc(ctx->cert->key->serverinfo) and...
Jonas Maebe [Mon, 9 Dec 2013 15:57:04 +0000 (16:57 +0100)]
serverinfo_process_buffer: check result of realloc(ctx->cert->key->serverinfo) and don't leak memory if it fails

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agossl3_digest_cached_records: check for NULL after allocating s->s3->handshake_dgst
Jonas Maebe [Mon, 9 Dec 2013 15:45:44 +0000 (16:45 +0100)]
ssl3_digest_cached_records: check for NULL after allocating s->s3->handshake_dgst

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agossl3_get_certificate_request: check for NULL after allocating s->cert->ctypes
Jonas Maebe [Sun, 8 Dec 2013 22:30:09 +0000 (23:30 +0100)]
ssl3_get_certificate_request: check for NULL after allocating s->cert->ctypes

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoSSL_COMP_add_compression_method: exit if allocating the new compression method struct...
Jonas Maebe [Mon, 2 Dec 2013 21:07:02 +0000 (22:07 +0100)]
SSL_COMP_add_compression_method: exit if allocating the new compression method struct fails

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoMove bn internal functions into bn_int.h and bn_lcl.h
Matt Caswell [Sun, 2 Nov 2014 20:16:59 +0000 (20:16 +0000)]
Move bn internal functions into bn_int.h and bn_lcl.h

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoUpdate documentation following BN opaquify
Matt Caswell [Sun, 2 Nov 2014 19:45:04 +0000 (19:45 +0000)]
Update documentation following BN opaquify

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMake bn opaque
Matt Caswell [Tue, 28 Oct 2014 23:16:06 +0000 (23:16 +0000)]
Make bn opaque

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoUpdate apps for bn opaque change
Matt Caswell [Tue, 28 Oct 2014 23:36:27 +0000 (23:36 +0000)]
Update apps for bn opaque change

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoDisable engines that will fail to build when bn is made opaque
Matt Caswell [Tue, 28 Oct 2014 23:04:39 +0000 (23:04 +0000)]
Disable engines that will fail to build when bn is made opaque

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from ts
Matt Caswell [Tue, 28 Oct 2014 23:04:10 +0000 (23:04 +0000)]
Implement internally opaque bn access from ts

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from srp
Matt Caswell [Thu, 30 Oct 2014 23:21:39 +0000 (23:21 +0000)]
Implement internally opaque bn access from srp

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from rsa
Matt Caswell [Tue, 28 Oct 2014 23:00:29 +0000 (23:00 +0000)]
Implement internally opaque bn access from rsa

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from evp
Matt Caswell [Tue, 28 Oct 2014 22:59:34 +0000 (22:59 +0000)]
Implement internally opaque bn access from evp

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from ec
Matt Caswell [Tue, 28 Oct 2014 22:58:56 +0000 (22:58 +0000)]
Implement internally opaque bn access from ec

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from dsa
Matt Caswell [Tue, 28 Oct 2014 22:56:18 +0000 (22:56 +0000)]
Implement internally opaque bn access from dsa

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from dh
Matt Caswell [Thu, 30 Oct 2014 23:58:19 +0000 (23:58 +0000)]
Implement internally opaque bn access from dh

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoImplement internally opaque bn access from asn1
Matt Caswell [Fri, 31 Oct 2014 00:01:18 +0000 (00:01 +0000)]
Implement internally opaque bn access from asn1

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoPrepare exptest for bn opaquify
Matt Caswell [Mon, 24 Nov 2014 10:36:27 +0000 (10:36 +0000)]
Prepare exptest for bn opaquify

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoPrepare for bn opaquify. Implement internal helper functions.
Matt Caswell [Mon, 24 Nov 2014 10:06:20 +0000 (10:06 +0000)]
Prepare for bn opaquify. Implement internal helper functions.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove internal bn dependancies from speed.c
Matt Caswell [Mon, 24 Nov 2014 10:05:04 +0000 (10:05 +0000)]
Remove internal bn dependancies from speed.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoInclude <openssl/foo.h> instead of "foo.h"
Geoff Thorpe [Sat, 11 Oct 2014 18:31:53 +0000 (14:31 -0400)]
Include <openssl/foo.h> instead of "foo.h"

Exported headers shouldn't be included as "foo.h" by code from the same
module, it should only do so for module-internal headers. This is
because the symlinking of exported headers (from include/openssl/foo.h
to crypto/foo/foo.h) is being removed, and the exported headers are
being moved to the include/openssl/ directory instead.

Change-Id: I4c1d80849544713308ddc6999a549848afc25f94
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoFixed memory leak in the event of a failure of BUF_MEM_grow
Matt Caswell [Thu, 4 Dec 2014 09:56:16 +0000 (09:56 +0000)]
Fixed memory leak in the event of a failure of BUF_MEM_grow

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoFix memory leak in SSL_new if errors occur.
Matt Caswell [Thu, 4 Dec 2014 09:46:44 +0000 (09:46 +0000)]
Fix memory leak in SSL_new if errors occur.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRemove fips directories from mkfiles.pl
Dr. Stephen Henson [Mon, 8 Dec 2014 13:59:28 +0000 (13:59 +0000)]
Remove fips directories from mkfiles.pl

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove references to deleted fips directory from Makefile.org
Dr. Stephen Henson [Mon, 8 Dec 2014 12:34:52 +0000 (12:34 +0000)]
Remove references to deleted fips directory from Makefile.org

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove OPENSSL_FIPSAPI
Dr. Stephen Henson [Mon, 20 Oct 2014 12:13:59 +0000 (13:13 +0100)]
remove OPENSSL_FIPSAPI

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove FIPS_*_SIZE_T
Dr. Stephen Henson [Sun, 19 Oct 2014 00:43:06 +0000 (01:43 +0100)]
remove FIPS_*_SIZE_T

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove FIPS module code from crypto/evp
Dr. Stephen Henson [Sun, 19 Oct 2014 00:29:04 +0000 (01:29 +0100)]
remove FIPS module code from crypto/evp

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove FIPS module code from crypto/bn
Dr. Stephen Henson [Sun, 19 Oct 2014 00:28:41 +0000 (01:28 +0100)]
remove FIPS module code from crypto/bn

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove FIPS module code from crypto/ecdh
Dr. Stephen Henson [Sun, 19 Oct 2014 00:14:21 +0000 (01:14 +0100)]
remove FIPS module code from crypto/ecdh

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove FIPS module code from crypto/ecdsa
Dr. Stephen Henson [Sun, 19 Oct 2014 00:11:59 +0000 (01:11 +0100)]
remove FIPS module code from crypto/ecdsa

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove FIPS module code from crypto/dh
Dr. Stephen Henson [Sun, 19 Oct 2014 00:08:28 +0000 (01:08 +0100)]
Remove FIPS module code from crypto/dh

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove FIPS module code from crypto/dsa
Dr. Stephen Henson [Sun, 19 Oct 2014 00:06:56 +0000 (01:06 +0100)]
remove FIPS module code from crypto/dsa

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove FIPS module code from crypto/rsa
Dr. Stephen Henson [Sun, 19 Oct 2014 00:04:07 +0000 (01:04 +0100)]
remove FIPS module code from crypto/rsa

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove FIPS error library from openssl.ec mkerr.pl
Dr. Stephen Henson [Sat, 18 Oct 2014 23:44:19 +0000 (00:44 +0100)]
Remove FIPS error library from openssl.ec mkerr.pl

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agomake depend
Dr. Stephen Henson [Sat, 18 Oct 2014 23:42:08 +0000 (00:42 +0100)]
make depend

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove fips.h reference.
Dr. Stephen Henson [Sat, 18 Oct 2014 23:40:07 +0000 (00:40 +0100)]
Remove fips.h reference.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove fips_constseg references.
Dr. Stephen Henson [Sat, 18 Oct 2014 23:35:57 +0000 (00:35 +0100)]
Remove fips_constseg references.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove another FIPSCANISTER reference
Dr. Stephen Henson [Sat, 18 Oct 2014 23:31:28 +0000 (00:31 +0100)]
remove another FIPSCANISTER reference

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoremove unnecessary OPENSSL_FIPS reference
Dr. Stephen Henson [Sat, 18 Oct 2014 23:22:10 +0000 (00:22 +0100)]
remove unnecessary OPENSSL_FIPS reference

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove OPENSSL_FIPSCANISTER code.
Dr. Stephen Henson [Sat, 18 Oct 2014 22:59:37 +0000 (23:59 +0100)]
Remove OPENSSL_FIPSCANISTER code.

OPENSSL_FIPSCANISTER is only set if the fips module is being built
(as opposed to being used). Since the fips module wont be built in
master this is redundant.
Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove FIPSCANISTERINTERNAL reference.
Dr. Stephen Henson [Sat, 18 Oct 2014 22:59:11 +0000 (23:59 +0100)]
Remove FIPSCANISTERINTERNAL reference.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove fips utility build rules from test/Makefile
Dr. Stephen Henson [Sat, 18 Oct 2014 22:56:45 +0000 (23:56 +0100)]
Remove fips utility build rules from test/Makefile

The fips test utilities are only build if an FIPS module is being
built from source. As this isn't done in master these are redundant.
Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove fipscanister build functionality from makefiles.
Dr. Stephen Henson [Sat, 18 Oct 2014 22:47:03 +0000 (23:47 +0100)]
Remove fipscanister build functionality from makefiles.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove fipscanister from Configure, delete fips directory
Dr. Stephen Henson [Sat, 18 Oct 2014 22:46:00 +0000 (23:46 +0100)]
Remove fipscanister from Configure, delete fips directory

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove some unnecessary OPENSSL_FIPS references
Dr. Stephen Henson [Sat, 18 Oct 2014 19:14:36 +0000 (20:14 +0100)]
Remove some unnecessary OPENSSL_FIPS references

FIPS_mode() exists in all versions of OpenSSL but always returns 0 if OpenSSL is not FIPS
capable.
Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdd CHANGES entry for OCB
Matt Caswell [Mon, 8 Dec 2014 00:04:25 +0000 (00:04 +0000)]
Add CHANGES entry for OCB

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdded OPENSSL_NO_OCB guards
Matt Caswell [Sun, 7 Dec 2014 23:53:22 +0000 (23:53 +0000)]
Added OPENSSL_NO_OCB guards

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdd documentation for OCB mode
Matt Caswell [Sat, 6 Dec 2014 20:55:53 +0000 (20:55 +0000)]
Add documentation for OCB mode

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdd tests for OCB mode
Matt Caswell [Sat, 6 Dec 2014 20:55:36 +0000 (20:55 +0000)]
Add tests for OCB mode

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdd EVP support for OCB mode
Matt Caswell [Sat, 6 Dec 2014 20:55:10 +0000 (20:55 +0000)]
Add EVP support for OCB mode

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoAdd support for OCB mode as per RFC7253
Matt Caswell [Sat, 6 Dec 2014 20:53:35 +0000 (20:53 +0000)]
Add support for OCB mode as per RFC7253

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoClarify the return values for SSL_get_shared_curve.
Emilia Kasper [Thu, 4 Dec 2014 14:00:11 +0000 (15:00 +0100)]
Clarify the return values for SSL_get_shared_curve.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoAdd extra checks for odd-length EC curve lists.
Emilia Kasper [Mon, 1 Dec 2014 15:55:55 +0000 (16:55 +0100)]
Add extra checks for odd-length EC curve lists.

Odd-length lists should be rejected everywhere upon parsing. Nevertheless,
be extra careful and add guards against off-by-one reads.

Also, drive-by replace inexplicable double-negation with an explicit comparison.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoReject elliptic curve lists of odd lengths.
Emilia Kasper [Mon, 1 Dec 2014 14:04:02 +0000 (15:04 +0100)]
Reject elliptic curve lists of odd lengths.

The Supported Elliptic Curves extension contains a vector of NamedCurves
of 2 bytes each, so the total length must be even. Accepting odd-length
lists was observed to lead to a non-exploitable one-byte out-of-bounds
read in the latest development branches (1.0.2 and master). Released
versions of OpenSSL are not affected.

Thanks to Felix Groebert of the Google Security Team for reporting this issue.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix broken build
Emilia Kasper [Fri, 5 Dec 2014 15:08:12 +0000 (16:08 +0100)]
Fix broken build

Add includes missing from commit 33eab3f6af51c6d7fe68ee4960930df4f1616bd5

Reviewed-by: Geoff Thorpe <geoff@openssl.org>
9 years agoReplace GOST_R_MALLOC_FAILURE and GOST_R_NO_MEMORY with ERR_R_MALLOC_FAILURE
Kurt Roeckx [Thu, 4 Dec 2014 17:34:29 +0000 (18:34 +0100)]
Replace GOST_R_MALLOC_FAILURE and GOST_R_NO_MEMORY with ERR_R_MALLOC_FAILURE

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agocapi_get_provname: Check return values
Kurt Roeckx [Thu, 4 Dec 2014 17:16:42 +0000 (18:16 +0100)]
capi_get_provname: Check return values

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agossl_create_cipher_list: check whether push onto cipherstack succeeds
Jonas Maebe [Mon, 2 Dec 2013 21:04:47 +0000 (22:04 +0100)]
ssl_create_cipher_list: check whether push onto cipherstack succeeds

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agossl_cert_dup: Fix memory leak
Jonas Maebe [Mon, 2 Dec 2013 20:46:46 +0000 (21:46 +0100)]
ssl_cert_dup: Fix memory leak

Always use goto err on failure and call ssl_cert_free() on the error path so all
fields and "ret" itself are freed

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agodtls1_new: free s on error path
Kurt Roeckx [Mon, 2 Dec 2013 17:07:14 +0000 (18:07 +0100)]
dtls1_new: free s on error path

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agodtls1_heartbeat: check for NULL after allocating s->cert->ctypes
Jonas Maebe [Sun, 8 Dec 2013 22:29:43 +0000 (23:29 +0100)]
dtls1_heartbeat: check for NULL after allocating s->cert->ctypes

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agodtls1_process_heartbeat: check for NULL after allocating buffer
Jonas Maebe [Sun, 8 Dec 2013 22:29:17 +0000 (23:29 +0100)]
dtls1_process_heartbeat: check for NULL after allocating buffer

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agocapi_get_key: check for NULL after allocating key
Jonas Maebe [Sun, 8 Dec 2013 22:05:56 +0000 (23:05 +0100)]
capi_get_key: check for NULL after allocating key

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agocapi_cert_get_fname: check for NULL after allocating wfname
Jonas Maebe [Sun, 8 Dec 2013 22:05:23 +0000 (23:05 +0100)]
capi_cert_get_fname: check for NULL after allocating wfname

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agocapi_get_provname: free name on error if it was malloc'ed
Jonas Maebe [Sun, 8 Dec 2013 22:04:54 +0000 (23:04 +0100)]
capi_get_provname: free name on error if it was malloc'ed

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agopkey_gost_mac_keygen: check for NULL after allocating keydata
Jonas Maebe [Sun, 8 Dec 2013 21:54:58 +0000 (22:54 +0100)]
pkey_gost_mac_keygen: check for NULL after allocating keydata

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agopkey_gost_ctrl: check for NULL after allocating pctx->shared_ukm
Jonas Maebe [Sun, 8 Dec 2013 21:54:33 +0000 (22:54 +0100)]
pkey_gost_ctrl: check for NULL after allocating pctx->shared_ukm

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoUpdate changes to indicate that SSLv2 support has been removed
Kurt Roeckx [Thu, 4 Dec 2014 14:50:03 +0000 (15:50 +0100)]
Update changes to indicate that SSLv2 support has been removed

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoRemove incorrect code inadvertently introduced through commit 59669b6ab.
Matt Caswell [Thu, 4 Dec 2014 09:22:50 +0000 (09:22 +0000)]
Remove incorrect code inadvertently introduced through commit 59669b6ab.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove SSLv2 support
Kurt Roeckx [Sun, 30 Nov 2014 14:35:22 +0000 (15:35 +0100)]
Remove SSLv2 support

The only support for SSLv2 left is receiving a SSLv2 compatible client hello.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoNew location on website for binaries.
Rich Salz [Wed, 3 Dec 2014 15:55:31 +0000 (10:55 -0500)]
New location on website for binaries.

Reviewed-by: Bodo Moeller <bodo@openssl.org>
9 years agoRemove "#if 0" code
Matt Caswell [Wed, 3 Dec 2014 09:21:09 +0000 (09:21 +0000)]
Remove "#if 0" code

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoOnly use the fallback mtu after 2 unsuccessful retransmissions if it is less
Matt Caswell [Tue, 2 Dec 2014 11:16:35 +0000 (11:16 +0000)]
Only use the fallback mtu after 2 unsuccessful retransmissions if it is less
than the mtu we are already using

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoUpdates to s_client and s_server to remove the constant 28 (for IPv4 header
Matt Caswell [Mon, 1 Dec 2014 23:57:44 +0000 (23:57 +0000)]
Updates to s_client and s_server to remove the constant 28 (for IPv4 header
and UDP header) when setting an mtu. This constant is not always correct (e.g.
if using IPv6). Use the new DTLS_CTRL functions instead.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoIf we really get a situation where the underlying mtu is less than the minimum
Matt Caswell [Tue, 2 Dec 2014 00:16:55 +0000 (00:16 +0000)]
If we really get a situation where the underlying mtu is less than the minimum
we will support then dtls1_do_write can go into an infinite loop. This commit
fixes that.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFix dtls_query_mtu so that it will always either complete with an mtu that is
Matt Caswell [Mon, 1 Dec 2014 22:18:18 +0000 (22:18 +0000)]
Fix dtls_query_mtu so that it will always either complete with an mtu that is
at least the minimum or it will fail.
There were some instances in dtls1_query_mtu where the final mtu can end up
being less than the minimum, i.e. where the user has set an mtu manually. This
shouldn't be allowed. Also remove dtls1_guess_mtu that, despite having
logic for guessing an mtu, was actually only ever used to work out the minimum
mtu to use.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove instances in libssl of the constant 28 (for size of IPv4 header + UDP)
Matt Caswell [Mon, 1 Dec 2014 23:58:05 +0000 (23:58 +0000)]
Remove instances in libssl of the constant 28 (for size of IPv4 header + UDP)
and instead use the value provided by the underlying BIO. Also provide some
new DTLS_CTRLs so that the library user can set the mtu without needing to
know this constant. These new DTLS_CTRLs provide the capability to set the
link level mtu to be used (i.e. including this IP/UDP overhead). The previous
DTLS_CTRLs required the library user to subtract this overhead first.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoThere are a number of instances throughout the code where the constant 28 is
Matt Caswell [Mon, 1 Dec 2014 23:49:47 +0000 (23:49 +0000)]
There are a number of instances throughout the code where the constant 28 is
used with no explanation. Some of this was introduced as part of RT#1929. The
value 28 is the length of the IP header (20 bytes) plus the UDP header (8
bytes). However use of this constant is incorrect because there may be
instances where a different value is needed, e.g. an IPv4 header is 20 bytes
but an IPv6 header is 40. Similarly you may not be using UDP (e.g. SCTP).
This commit introduces a new BIO_CTRL that provides the value to be used for
this mtu "overhead". It will be used by subsequent commits.

Reviewed-by: Tim Hudson <tjh@openssl.org>