oweals/openssl.git
9 years agobn/rsaz_exp.c: make it indent-friendly.
Andy Polyakov [Tue, 20 Jan 2015 11:55:04 +0000 (12:55 +0100)]
bn/rsaz_exp.c: make it indent-friendly.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFix make errors
Matt Caswell [Wed, 14 Jan 2015 21:26:14 +0000 (21:26 +0000)]
Fix make errors

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMake the script a little more location agnostic
Richard Levitte [Tue, 20 Jan 2015 15:18:23 +0000 (16:18 +0100)]
Make the script a little more location agnostic

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoProvide script for filtering data initialisers for structs/unions. indent just can...
Matt Caswell [Tue, 20 Jan 2015 12:37:42 +0000 (12:37 +0000)]
Provide script for filtering data initialisers for structs/unions. indent just can't handle it.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoScript fixes.
Dr. Stephen Henson [Tue, 20 Jan 2015 14:12:10 +0000 (14:12 +0000)]
Script fixes.

Don't use double newline for headers.
Don't interpret ASN1_PCTX as start of an ASN.1 module.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRun expand before perl, to make sure things are properly aligned
Richard Levitte [Tue, 20 Jan 2015 14:17:02 +0000 (15:17 +0100)]
Run expand before perl, to make sure things are properly aligned

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoForce the use of our indent profile
Richard Levitte [Tue, 20 Jan 2015 14:14:24 +0000 (15:14 +0100)]
Force the use of our indent profile

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoProvide source reformating script. Requires GNU indent to be
Tim Hudson [Mon, 5 Jan 2015 10:17:50 +0000 (10:17 +0000)]
Provide source reformating script. Requires GNU indent to be
available.

Script written by Tim Hudson, with amendments by Steve Henson, Rich Salz and
Matt Caswell

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix source where indent will not be able to cope
Matt Caswell [Mon, 19 Jan 2015 12:42:01 +0000 (12:42 +0000)]
Fix source where indent will not be able to cope

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoYet more comments
Matt Caswell [Fri, 16 Jan 2015 15:52:31 +0000 (15:52 +0000)]
Yet more comments

Conflicts:
crypto/dsa/dsa_asn1.c
crypto/pem/pem_all.c
fips/dh/dh_gen.c
fips/dh/fips_dh_check.c
fips/dh/fips_dh_gen.c
ssl/ssl_ciph.c

Conflicts:
ssl/d1_clnt.c

Conflicts:
ssl/s2_pkt.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoMore comments
Matt Caswell [Fri, 16 Jan 2015 14:43:29 +0000 (14:43 +0000)]
More comments

Conflicts:
crypto/dsa/dsa_vrf.c
crypto/ec/ec2_smpl.c
crypto/ec/ecp_smpl.c

Conflicts:
demos/bio/saccept.c
ssl/d1_clnt.c

Conflicts:
bugs/dggccbug.c
demos/tunala/cb.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFurther comment changes for reformat (master)
Matt Caswell [Fri, 16 Jan 2015 09:21:50 +0000 (09:21 +0000)]
Further comment changes for reformat (master)

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoCleanup OPENSSL_NO_xxx, part 1 master-pre-reformat
Rich Salz [Wed, 14 Jan 2015 20:57:28 +0000 (15:57 -0500)]
Cleanup OPENSSL_NO_xxx, part 1

OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160
OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO
Two typo's on #endif comments fixed:
OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB
OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoAdd Broadwell performance results.
Andy Polyakov [Mon, 5 Jan 2015 22:40:10 +0000 (23:40 +0100)]
Add Broadwell performance results.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoRemove use of BN_init, BN_RECP_CTX_init from bntest
Dr. Stephen Henson [Tue, 13 Jan 2015 15:21:28 +0000 (15:21 +0000)]
Remove use of BN_init, BN_RECP_CTX_init from bntest

BN_init and BN_RECP_CTX_init are deprecated and are not exported
from shared libraries on some platforms (e.g. Windows) convert
bntest to use BN_new and BN_RECP_CTX_new instead.
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFor master windows build dsa.h is now needed.
Dr. Stephen Henson [Tue, 13 Jan 2015 15:20:34 +0000 (15:20 +0000)]
For master windows build dsa.h is now needed.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoMake output from openssl version -f consistent with previous versions
Matt Caswell [Tue, 13 Jan 2015 10:20:12 +0000 (10:20 +0000)]
Make output from openssl version -f consistent with previous versions

Reviewed-by: Andy Polyakov <appro@openssl.org>
9 years agoFix warning where BIO_FLAGS_UPLINK was being redefined.
Matt Caswell [Sat, 10 Jan 2015 23:36:28 +0000 (23:36 +0000)]
Fix warning where BIO_FLAGS_UPLINK was being redefined.
This warning breaks the build in 1.0.0 and 0.9.8

Reviewed-by: Andy Polyakov <appro@openssl.org>
9 years agoAvoid deprecation problems in Visual Studio 13
Matt Caswell [Fri, 9 Jan 2015 14:06:36 +0000 (14:06 +0000)]
Avoid deprecation problems in Visual Studio 13

Reviewed-by: Andy Polyakov <appro@openssl.org>
9 years agoEnsure internal header files are used from mk1mf based builds
Matt Caswell [Tue, 13 Jan 2015 00:01:39 +0000 (00:01 +0000)]
Ensure internal header files are used from mk1mf based builds

Reviewed-by: Richard Levitte: <levitte@openssl.org>
9 years agoRT3548: Remove unsupported platforms
Rich Salz [Mon, 12 Jan 2015 22:29:26 +0000 (17:29 -0500)]
RT3548: Remove unsupported platforms

This last one for this ticket.  Removes WIN16.
So long, MS_CALLBACK and MS_FAR.  We won't miss you.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoAllow multiple IDN xn-- indicators
Rich Salz [Mon, 12 Jan 2015 17:39:00 +0000 (12:39 -0500)]
Allow multiple IDN xn-- indicators

Update the X509v3 name parsing to allow multiple xn-- international
domain name indicators in a name.  Previously, only allowed one at
the beginning of a name, which was wrong.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
9 years agoRT3548: Remove some unsupported platforms.
Rich Salz [Mon, 12 Jan 2015 15:40:00 +0000 (10:40 -0500)]
RT3548: Remove some unsupported platforms.

This commit removes NCR, Tandem, Cray.
Regenerates TABLE.
Removes another missing BEOS fluff.
The last platform remaining on this ticket is WIN16.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRT478: Add uninstall make target
Rich Salz [Mon, 12 Jan 2015 15:28:05 +0000 (10:28 -0500)]
RT478: Add uninstall make target

Add INSTALLDIRS variable, list of directories where things get
installed. Change install_html_docs to use perl mkdir-p script.

Add uninstall, uninstall_sw, uninstall_docs, uninstall_html_docs
to Makefile.org.  The actions of these targets were figured out
by "inverting" the install target.

Recurse into subdirs to do uninstall as needed.  Added uninstall
targets whose actions were similarly figured out by "inverting"
the install target.

Also remove some 'space before tab' complaints in Makefile.org

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFix no-deprecated on Windows
Matt Caswell [Sun, 11 Jan 2015 00:22:41 +0000 (00:22 +0000)]
Fix no-deprecated on Windows

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agomake update
Matt Caswell [Sun, 11 Jan 2015 00:27:50 +0000 (00:27 +0000)]
make update

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRemove redundant DSO_METHOD_beos declaration in dso.h. BEOS support has been
Matt Caswell [Sun, 11 Jan 2015 00:26:38 +0000 (00:26 +0000)]
Remove redundant DSO_METHOD_beos declaration in dso.h. BEOS support has been
removed.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoMake build reproducible
Kurt Roeckx [Fri, 2 Jan 2015 11:27:57 +0000 (12:27 +0100)]
Make build reproducible

It contained a date on when it was build.

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoFurther windows specific .gitignore entries
Matt Caswell [Fri, 9 Jan 2015 23:01:20 +0000 (23:01 +0000)]
Further windows specific .gitignore entries

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoUpdate .gitignore with windows files to be excluded from git
Matt Caswell [Fri, 9 Jan 2015 10:19:10 +0000 (10:19 +0000)]
Update .gitignore with windows files to be excluded from git

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFix build failure on Windows due to undefined cflags identifier
Matt Caswell [Thu, 8 Jan 2015 19:05:43 +0000 (19:05 +0000)]
Fix build failure on Windows due to undefined cflags identifier

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoA memory leak can occur in dtls1_buffer_record if either of the calls to
Matt Caswell [Wed, 7 Jan 2015 14:18:13 +0000 (14:18 +0000)]
A memory leak can occur in dtls1_buffer_record if either of the calls to
ssl3_setup_buffers or pqueue_insert fail. The former will fail if there is a
malloc failure, whilst the latter will fail if attempting to add a duplicate
record to the queue. This should never happen because duplicate records should
be detected and dropped before any attempt to add them to the queue.
Unfortunately records that arrive that are for the next epoch are not being
recorded correctly, and therefore replays are not being detected.
Additionally, these "should not happen" failures that can occur in
dtls1_buffer_record are not being treated as fatal and therefore an attacker
could exploit this by sending repeated replay records for the next epoch,
eventually causing a DoS through memory exhaustion.

Thanks to Chris Mueller for reporting this issue and providing initial
analysis and a patch. Further analysis and the final patch was performed by
Matt Caswell from the OpenSSL development team.

CVE-2015-0206

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
9 years agoUnauthenticated DH client certificate fix.
Dr. Stephen Henson [Thu, 23 Oct 2014 19:36:17 +0000 (20:36 +0100)]
Unauthenticated DH client certificate fix.

Fix to prevent use of DH client certificates without sending
certificate verify message.

If we've used a client certificate to generate the premaster secret
ssl3_get_client_key_exchange returns 2 and ssl3_get_cert_verify is
never called.

We can only skip the certificate verify message in
ssl3_get_cert_verify if the client didn't send a certificate.

Thanks to Karthikeyan Bhargavan for reporting this issue.
CVE-2015-0205
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix for CVE-2014-3570 (with minor bn_asm.c revamp).
Andy Polyakov [Mon, 5 Jan 2015 14:20:54 +0000 (15:20 +0100)]
Fix for CVE-2014-3570 (with minor bn_asm.c revamp).

Reviewed-by: Emilia Kasper <emilia@openssl.org>
9 years agoFollow on from CVE-2014-3571. This fixes the code that was the original source
Matt Caswell [Sat, 3 Jan 2015 00:54:35 +0000 (00:54 +0000)]
Follow on from CVE-2014-3571. This fixes the code that was the original source
of the crash due to p being NULL. Steve's fix prevents this situation from
occuring - however this is by no means obvious by looking at the code for
dtls1_get_record. This fix just makes things look a bit more sane.

Reviewed-by: Dr Stephen Henson <steve@openssl.org>
9 years agoFix crash in dtls1_get_record whilst in the listen state where you get two
Dr. Stephen Henson [Sat, 3 Jan 2015 00:45:13 +0000 (00:45 +0000)]
Fix crash in dtls1_get_record whilst in the listen state where you get two
separate reads performed - one for the header and one for the body of the
handshake record.

CVE-2014-3571

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agofix error discrepancy
Dr. Stephen Henson [Wed, 7 Jan 2015 17:36:17 +0000 (17:36 +0000)]
fix error discrepancy

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix irix-cc build.
Andy Polyakov [Mon, 5 Jan 2015 21:56:47 +0000 (22:56 +0100)]
Fix irix-cc build.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agouse correct credit in CHANGES
Dr. Stephen Henson [Tue, 6 Jan 2015 21:12:15 +0000 (21:12 +0000)]
use correct credit in CHANGES

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoOnly inherit the session ID context in SSL_set_SSL_CTX if the existing
Emilia Kasper [Tue, 6 Jan 2015 14:41:04 +0000 (15:41 +0100)]
Only inherit the session ID context in SSL_set_SSL_CTX if the existing
context was also inherited (matches that of the existing SSL_CTX).

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agouse correct function name
Dr. Stephen Henson [Tue, 6 Jan 2015 20:55:38 +0000 (20:55 +0000)]
use correct function name

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoRT3662: Allow leading . in nameConstraints
Dr. Stephen Henson [Tue, 6 Jan 2015 20:29:28 +0000 (15:29 -0500)]
RT3662: Allow leading . in nameConstraints

Change by SteveH from original by John Denker (in the RT)

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoSome cleanup of L<> markup in pod files
Rich Salz [Tue, 6 Jan 2015 17:16:24 +0000 (12:16 -0500)]
Some cleanup of L<> markup in pod files

Show only the #define, not the values, in BIO_f_buffer.  Data
abstraction and we can remove a "see also" entry.

Remove internal forward reference to NOTES in EVP_EncryptInit; just
say "see below" as we do in the other pages.

Add missing (3) in pem.pod so the L<> entry is consistent.
Fix entry to point to the "master" page, not the symlink'd one.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix memory leak.
Martin Brejcha [Sun, 16 Nov 2014 17:04:40 +0000 (17:04 +0000)]
Fix memory leak.

Fix memory leak by freeing up saved_message.data if it is not NULL.

PR#3489
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoFurther comment amendments to preserve formatting prior to source reformat
Matt Caswell [Mon, 5 Jan 2015 00:34:00 +0000 (00:34 +0000)]
Further comment amendments to preserve formatting prior to source reformat

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRemove blank line from start of cflags character array in buildinf.h
Matt Caswell [Tue, 6 Jan 2015 15:32:01 +0000 (15:32 +0000)]
Remove blank line from start of cflags character array in buildinf.h

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoCHANGES: mention "universal" ARM support.
Andy Polyakov [Tue, 6 Jan 2015 11:13:36 +0000 (12:13 +0100)]
CHANGES: mention "universal" ARM support.

This is re-commit without unrelated modification.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoRevert "CHANGES: mention "universal" ARM support."
Andy Polyakov [Tue, 6 Jan 2015 11:11:01 +0000 (12:11 +0100)]
Revert "CHANGES: mention "universal" ARM support."

This reverts commit 4fec91506975f62a2f93be71a46acc7fae7eef45.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoCHANGES: mention "universal" ARM support.
Andy Polyakov [Tue, 6 Jan 2015 10:10:01 +0000 (11:10 +0100)]
CHANGES: mention "universal" ARM support.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agofix compilation error
Dr. Stephen Henson [Tue, 6 Jan 2015 02:17:07 +0000 (02:17 +0000)]
fix compilation error

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoOnly allow ephemeral RSA keys in export ciphersuites.
Dr. Stephen Henson [Thu, 23 Oct 2014 16:09:57 +0000 (17:09 +0100)]
Only allow ephemeral RSA keys in export ciphersuites.

OpenSSL clients would tolerate temporary RSA keys in non-export
ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which
enabled this server side. Remove both options as they are a
protocol violation.

Thanks to Karthikeyan Bhargavan for reporting this issue.
(CVE-2015-0204)
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoECDH downgrade bug fix.
Dr. Stephen Henson [Fri, 24 Oct 2014 11:30:33 +0000 (12:30 +0100)]
ECDH downgrade bug fix.

Fix bug where an OpenSSL client would accept a handshake using an
ephemeral ECDH ciphersuites with the server key exchange message omitted.

Thanks to Karthikeyan Bhargavan for reporting this issue.

CVE-2014-3572
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoRT3546: Remove #define IRIX_CC_BUG
Rich Salz [Mon, 5 Jan 2015 21:05:54 +0000 (16:05 -0500)]
RT3546: Remove #define IRIX_CC_BUG

Leftovers from commit 448155e9bbda27cbba365ff549a7e2044a8a399f
Remove now-unused #define's

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoupdate ordinals
Dr. Stephen Henson [Mon, 5 Jan 2015 16:50:31 +0000 (16:50 +0000)]
update ordinals

Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 31c65a7bc0de7ff1446645d41af388893362f579)

9 years agoEnsure that the session ID context of an SSL* is updated
Adam Langley [Mon, 5 Jan 2015 16:28:33 +0000 (17:28 +0100)]
Ensure that the session ID context of an SSL* is updated
when its SSL_CTX is updated.

From BoringSSL commit
https://boringssl.googlesource.com/boringssl/+/a5dc545bbcffd9c24cebe65e9ab5ce72d4535e3a

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoConstify ASN1_TYPE_cmp add X509_ALGOR_cmp.
Dr. Stephen Henson [Sun, 14 Dec 2014 23:14:15 +0000 (23:14 +0000)]
Constify ASN1_TYPE_cmp add X509_ALGOR_cmp.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoFix various certificate fingerprint issues.
Dr. Stephen Henson [Sat, 20 Dec 2014 15:09:50 +0000 (15:09 +0000)]
Fix various certificate fingerprint issues.

By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. those using the
certificate fingerprint for blacklists.

1. Reject signatures with non zero unused bits.

If the BIT STRING containing the signature has non zero unused bits reject
the signature. All current signature algorithms require zero unused bits.

2. Check certificate algorithm consistency.

Check the AlgorithmIdentifier inside TBS matches the one in the
certificate signature. NB: this will result in signature failure
errors for some broken certificates.

3. Check DSA/ECDSA signatures use DER.

Reencode DSA/ECDSA signatures and compare with the original received
signature. Return an error if there is a mismatch.

This will reject various cases including garbage after signature
(thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS
program for discovering this case) and use of BER or invalid ASN.1 INTEGERs
(negative or with leading zeroes).

CVE-2014-8275
Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoAdditional fix required for no-srtp to work
Matt Caswell [Mon, 22 Dec 2014 11:34:24 +0000 (11:34 +0000)]
Additional fix required for no-srtp to work

RT3638

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoFix building with no-srtp
Piotr Sikora [Mon, 22 Dec 2014 11:15:51 +0000 (11:15 +0000)]
Fix building with no-srtp

RT3638

Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoAdd a clang build target for linux-x86_64
Emilia Kasper [Mon, 5 Jan 2015 12:46:26 +0000 (13:46 +0100)]
Add a clang build target for linux-x86_64

This change documents the world as-is, by turning all warnings on,
and then turning warnings that trigger off again.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRemove inconsistency in ARM support.
Andy Polyakov [Fri, 7 Nov 2014 21:48:22 +0000 (22:48 +0100)]
Remove inconsistency in ARM support.
This facilitates "universal" builds, ones that target multiple
architectures, e.g. ARMv5 through ARMv7. See commentary in
Configure for details.

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoecp_nistz256-x86_64.pl: fix occasional failures.
Andy Polyakov [Sun, 4 Jan 2015 20:29:50 +0000 (21:29 +0100)]
ecp_nistz256-x86_64.pl: fix occasional failures.

RT: 3607
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: Emilia Kasper <emilia@openssl.org>
9 years agoRT2914: NULL check missing in X509_name_canon
Rich Salz [Sun, 4 Jan 2015 19:51:04 +0000 (14:51 -0500)]
RT2914: NULL check missing in X509_name_canon

Check for NULL return from X509_NAME_ENTRY_new()

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
9 years agoRemove SGC restart flag.
Dr. Stephen Henson [Fri, 2 Jan 2015 22:40:41 +0000 (22:40 +0000)]
Remove SGC restart flag.

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoRemove MS SGC
Dr. Stephen Henson [Fri, 24 Oct 2014 01:36:13 +0000 (02:36 +0100)]
Remove MS SGC

MS Server gated cryptography is obsolete and dates from the time of export
restrictions on strong encryption and is only used by ancient versions of
MSIE.
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoClear existing extension state.
Dr. Stephen Henson [Fri, 5 Dec 2014 13:39:14 +0000 (13:39 +0000)]
Clear existing extension state.

When parsing ClientHello clear any existing extension state from
SRP login and SRTP profile.

Thanks to Karthikeyan Bhargavan for reporting this issue.
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agotypo in s_client
Dominik Neubauer [Tue, 4 Mar 2014 21:22:29 +0000 (22:22 +0100)]
typo in s_client

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
9 years agoremove duplicate defines
Martin Nowak [Mon, 21 Apr 2014 18:03:07 +0000 (20:03 +0200)]
remove duplicate defines

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
9 years agoconstify tls 1.2 lookup tables.
Cristian Rodríguez [Sun, 20 Apr 2014 21:41:15 +0000 (18:41 -0300)]
constify tls 1.2 lookup tables.

None of this should live in writable memory

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Geoff Thorpe <geoff@openssl.org>
9 years agoAdd missing include of sys/time.h
Kurt Roeckx [Tue, 30 Dec 2014 16:14:49 +0000 (17:14 +0100)]
Add missing include of sys/time.h

gettimeofday was undefined

Reviewed-by: Geoff Thorpe <geoff@openssl.org>
9 years agomark all block comments that need format preserving so that
Tim Hudson [Sun, 28 Dec 2014 02:48:40 +0000 (12:48 +1000)]
mark all block comments that need format preserving so that
indent will not alter them when reformatting comments

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoMake "run" volatile
Kurt Roeckx [Tue, 16 Dec 2014 11:35:21 +0000 (12:35 +0100)]
Make "run" volatile

RT#3629

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoDocument openssl dgst -hmac option
Thorsten Glaser [Fri, 22 May 2009 16:28:05 +0000 (16:28 +0000)]
Document openssl dgst -hmac option

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agodlfcn: always define _GNU_SOURCE
Kurt Roeckx [Mon, 23 Dec 2013 18:06:34 +0000 (19:06 +0100)]
dlfcn: always define _GNU_SOURCE

We need this for the freebsd kernel with glibc as used in the Debian kfreebsd
ports.  There shouldn't be a problem defining this on systems not using glibc.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoFix memory leak in the apps
Kurt Roeckx [Sun, 7 Dec 2014 21:25:39 +0000 (22:25 +0100)]
Fix memory leak in the apps

The BIO_free() allocated ex_data again that we already freed.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRT3548: Remove unsupported platforms
Rich Salz [Sun, 28 Dec 2014 06:17:52 +0000 (01:17 -0500)]
RT3548: Remove unsupported platforms

This commit removes DG-UX.
It also flushes out some left-behinds in config.
And regenerates TABLE from Configure (hadn't been done in awhile).

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRT3548: unsupported platforms
Rich Salz [Thu, 25 Dec 2014 21:16:29 +0000 (16:16 -0500)]
RT3548: unsupported platforms

This commit removes Sinix/ReliantUNIX RM400
(And a missed piece of BEOS fluff)

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRT3548: Remove unsupported platforms.
Rich Salz [Mon, 22 Dec 2014 22:47:28 +0000 (17:47 -0500)]
RT3548: Remove unsupported platforms.

This commit removes MPE/iX

Reviewed-by: Andy Polyakov <appro@openssl.org>
9 years agoImproves certificates HOWTO
Alok Menghrajani [Mon, 1 Dec 2014 03:21:31 +0000 (19:21 -0800)]
Improves certificates HOWTO

* adds links to various related documents.
* fixes a few typos.
* rewords a few sentences.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoSmall typo
Richard Levitte [Mon, 22 Dec 2014 13:30:23 +0000 (14:30 +0100)]
Small typo

Reviewed-by: Stephen Henson <steve@openssl.org>
9 years agoRT3548: Remvoe unsupported platforms
Rich Salz [Mon, 22 Dec 2014 04:18:02 +0000 (23:18 -0500)]
RT3548: Remvoe unsupported platforms

This commit removes SunOS (a sentimental favorite of mine).

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoFix incorrect OPENSSL_assert() usage.
Michael Tuexen [Sun, 16 Nov 2014 17:29:08 +0000 (17:29 +0000)]
Fix incorrect OPENSSL_assert() usage.

Return an error code for I/O errors instead of an assertion failure.

PR#3470
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRT3548: Remove outdated platforms
Rich Salz [Sat, 20 Dec 2014 02:11:09 +0000 (21:11 -0500)]
RT3548: Remove outdated platforms

This commit removes all mention of NeXT and NextStep.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoFix a problem if CFLAGS is too long cversion.c fails to compile when config
Matt Caswell [Fri, 19 Dec 2014 10:55:54 +0000 (10:55 +0000)]
Fix a problem if CFLAGS is too long cversion.c fails to compile when config
is run with --strict-warnings.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoMade it an error to define OPENSSL_USE_DEPRECATED if OpenSSL has been built
Matt Caswell [Thu, 18 Dec 2014 15:03:09 +0000 (15:03 +0000)]
Made it an error to define OPENSSL_USE_DEPRECATED if OpenSSL has been built
with OPENSSL_NO_DEPRECATED defined

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoUpdate CHANGES for deprecated updates
Matt Caswell [Wed, 17 Dec 2014 14:27:22 +0000 (14:27 +0000)]
Update CHANGES for deprecated updates

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agomake update following changes to default config settings
Matt Caswell [Wed, 17 Dec 2014 14:24:21 +0000 (14:24 +0000)]
make update following changes to default config settings

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoChange all instances of OPENSSL_NO_DEPRECATED to OPENSSL_USE_DEPRECATED
Matt Caswell [Wed, 17 Dec 2014 13:30:41 +0000 (13:30 +0000)]
Change all instances of OPENSSL_NO_DEPRECATED to OPENSSL_USE_DEPRECATED
Introduce use of DECLARE_DEPRECATED

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoRemove redundant OPENSSL_NO_DEPRECATED suppression
Matt Caswell [Wed, 17 Dec 2014 13:21:54 +0000 (13:21 +0000)]
Remove redundant OPENSSL_NO_DEPRECATED suppression

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoTurn on OPENSSL_NO_DEPRECATED by default.
Matt Caswell [Wed, 17 Dec 2014 13:17:26 +0000 (13:17 +0000)]
Turn on OPENSSL_NO_DEPRECATED by default.
Also introduce OPENSSL_USE_DEPRECATED. If OPENSSL_NO_DEPRECATED is
defined at config stage then OPENSSL_USE_DEPRECATED has no effect -
deprecated functions are not available.
If OPENSSL_NO_DEPRECATED is not defined at config stage then
applications must define OPENSSL_USE_DEPRECATED in order to access
deprecated functions.
Also introduce compiler warnings for gcc for applications using
deprecated functions

Reviewed-by: Rich Salz <rsalz@openssl.org>
9 years agoRT3548: Remove some obsolete platforms
Rich Salz [Thu, 18 Dec 2014 19:17:33 +0000 (14:17 -0500)]
RT3548: Remove some obsolete platforms

This commit removes Sony NEWS4

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoReturn error when a bit string indicates an invalid amount of bits left
Kurt Roeckx [Mon, 15 Dec 2014 16:15:16 +0000 (17:15 +0100)]
Return error when a bit string indicates an invalid amount of bits left

Reviewed-by: Matt Caswell <matt@openssl.org>
9 years agoFix yet anoither 'make clean' breakage.
Rich Salz [Thu, 18 Dec 2014 05:13:46 +0000 (00:13 -0500)]
Fix yet anoither 'make clean' breakage.

Reviewed-by: Tim Hudson <tjh@openssl.org>
9 years agoRT3548: Remove some obsolete platforms
Rich Salz [Wed, 17 Dec 2014 22:24:51 +0000 (17:24 -0500)]
RT3548: Remove some obsolete platforms

This commit removes BEOS.

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoRT3544: Restore MWERKS for NetWare
Rich Salz [Wed, 17 Dec 2014 22:20:42 +0000 (17:20 -0500)]
RT3544: Restore MWERKS for NetWare

Reviewed-by: Richard Levitte <levitte@openssl.org>
9 years agoReject invalid constructed encodings.
Dr. Stephen Henson [Tue, 16 Dec 2014 23:13:19 +0000 (23:13 +0000)]
Reject invalid constructed encodings.

According to X6.90 null, object identifier, boolean, integer and enumerated
types can only have primitive encodings: return an error if any of
these are received with a constructed encoding.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
9 years agoAdd a comment noting the padding oracle.
Emilia Kasper [Wed, 17 Dec 2014 11:25:28 +0000 (12:25 +0100)]
Add a comment noting the padding oracle.

Reviewed-by: Andy Polyakov <appro@openssl.org>
9 years agoRevert "RT3425: constant-time evp_enc"
Emilia Kasper [Wed, 17 Dec 2014 11:08:27 +0000 (12:08 +0100)]
Revert "RT3425: constant-time evp_enc"

Causes more problems than it fixes: even though error codes
are not part of the stable API, several users rely on the
specific error code, and the change breaks them. Conversely,
we don't have any concrete use-cases for constant-time behaviour here.

This reverts commit 4aac102f75b517bdb56b1bcfd0a856052d559f6e.

Reviewed-by: Andy Polyakov <appro@openssl.org>
9 years agoBuild fixes
Emilia Kasper [Mon, 15 Dec 2014 15:37:13 +0000 (16:37 +0100)]
Build fixes

Various build fixes, mostly uncovered by clang's unused-const-variable
and unused-function errors.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>
(cherry picked from commit 0e1c318ece3c82e96ae95a34a1badf58198d6b28)

9 years agoPremaster secret handling fixes
Adam Langley [Tue, 16 Dec 2014 13:03:47 +0000 (14:03 +0100)]
Premaster secret handling fixes

From BoringSSL
- Send an alert when the client key exchange isn't correctly formatted.
- Reject overly short RSA ciphertexts to avoid a (benign) out-of-bounds memory access.

Reviewed-by: Kurt Roeckx <kurt@openssl.org>