Commit graph

11076 commits

Author SHA1 Message Date
Matt Caswell
f2ebe2a60e Move length check earlier to ensure we don't go beyond the end of the user's buffer. PR#3320 2014-05-11 11:32:17 +01:00
Tim Hudson
011ee91105 safety check to ensure we dont send out beyond the users buffer 2014-05-11 11:32:17 +01:00
Dr. Stephen Henson
2c4144638a Return an error if no recipient type matches.
If the key type does not match any CMS recipient type return
an error instead of using a random key (MMA mitigation). This
does not leak any useful information to an attacker.

PR#3348
(cherry picked from commit bd43b4cf778a53ffa5d77510ecd408a009dc00d2)
2014-05-09 14:24:53 +01:00
Tim Hudson
2fc04cb872 coverity 966576 - close socket in error path 2014-05-08 23:22:28 +01:00
Tim Hudson
62cc5ff623 PR#3342 fix resource leak coverity issue 966577 2014-05-08 23:22:21 +01:00
Tim Hudson
afe343c3a7 fix coverity issue 966597 - error line is not always initialised 2014-05-07 23:57:00 +01:00
Matt Caswell
e0d2139045 Fixed NULL pointer dereference in PKCS7_dataDecode reported by David Ramos in PR#3339 2014-05-07 23:23:15 +01:00
Geoff Thorpe
d60f019321 dso: eliminate VMS code on non-VMS systems
Even though the meat of dso_vms.c is compiled out on non-VMS builds,
the (pre-)compiler still traverses some of the macro handling. This
trips up at least one non-VMS build configuration, so this commit
makes the skip-VMS case more robust.

Signed-off-by: Geoff Thorpe <geoff@openssl.org>
2014-05-06 18:03:52 -04:00
Geoff Thorpe
65402586c0 evp: prevent underflow in base64 decoding
This patch resolves RT ticket #2608.

Thanks to Robert Dugal for originally spotting this, and to David
Ramos for noticing that the ball had been dropped.

Signed-off-by: Geoff Thorpe <geoff@openssl.org>
2014-05-06 18:02:02 -04:00
Geoff Thorpe
bf43446835 bignum: allow concurrent BN_MONT_CTX_set_locked()
The lazy-initialisation of BN_MONT_CTX was serialising all threads, as
noted by Daniel Sands and co at Sandia. This was to handle the case that
2 or more threads race to lazy-init the same context, but stunted all
scalability in the case where 2 or more threads are doing unrelated
things! We favour the latter case by punishing the former. The init work
gets done by each thread that finds the context to be uninitialised, and
we then lock the "set" logic after that work is done - the winning
thread's work gets used, the losing threads throw away what they've done.

Signed-off-by: Geoff Thorpe <geoff@openssl.org>
2014-05-06 18:01:59 -04:00
Dr. Stephen Henson
7169e56d6b Initialize num properly.
PR#3289
PR#3345
(cherry picked from commit 3ba1e406c2)
2014-05-06 14:09:07 +01:00
Dr. Stephen Henson
1047b8c84d Set Enveloped data version to 2 if ktri version not zero.
(cherry picked from commit 546b1b4384)
2014-05-06 14:00:11 +01:00
Tim Hudson
9740a03695 - fix coverity issues 966593-966596 2014-05-06 00:04:59 +01:00
David Ramos
e34af3ec2b Double free in i2o_ECPublicKey
PR: 3338
2014-05-04 00:50:42 +01:00
Jeff Trawick
d576146ebf typo in SSL_get_peer_cert_chain docs
RT: 3304
2014-05-02 00:26:05 +01:00
Matt Caswell
7441e7dbe9 Fixed spelling error in error message. Fix supplied by Marcos Marado 2014-05-01 00:27:02 +01:00
Matt Caswell
1d3f432b53 Fixed various pod errors 2014-05-01 00:07:28 +01:00
Lubomir Rintel
15a4add72d POD: Fix item numbering
Newer pod2man considers =item [1-9] part of a numbered list, while =item
0 starts an unnumbered list. Add a zero effect formatting mark to override
this.

doc/apps/smime.pod around line 315: Expected text after =item, not a
number
...

PR#3146
2014-04-30 23:44:54 +01:00
Geoff Thorpe
3cc546a3bb bignum: fix boundary condition in montgomery logic
It's not clear whether this inconsistency could lead to an actual
computation error, but it involved a BIGNUM being passed around the
montgomery logic in an inconsistent state. This was found using flags
-DBN_DEBUG -DBN_DEBUG_RAND, and working backwards from this assertion
in 'ectest';

ectest: bn_mul.c:960: BN_mul: Assertion `(_bnum2->top == 0) ||
(_bnum2->d[_bnum2->top - 1] != 0)' failed

Signed-off-by: Geoff Thorpe <geoff@openssl.org>
(cherry picked from commit a529261891)
2014-04-30 11:53:09 -04:00
Geoff Thorpe
c434f7f80f util/mkerr.pl: fix perl warning
Gets rid of this;

defined(@array) is deprecated at ../util/mkerr.pl line 792.
        (Maybe you should just omit the defined()?)
defined(@array) is deprecated at ../util/mkerr.pl line 800.
        (Maybe you should just omit the defined()?)

Signed-off-by: Geoff Thorpe <geoff@openssl.org>
(cherry picked from commit 647f360e2e)
2014-04-30 11:52:08 -04:00
mancha
e6a01b47e4 Fix version documentation.
Specify -f is for compilation flags. Add -d to synopsis section.

(cherry picked from commit 006397ea62bbcae22c8664d53c2222b808c4bdd1)

Closes #78.
2014-04-26 11:20:00 +01:00
mancha
3f1b3d9675 Fix eckey_priv_encode()
Fix eckey_priv_encode to return an error on failure of i2d_ECPrivateKey.
2014-04-24 19:31:49 +00:00
Steve Marquess
3e124d66c8 Add new sponsors
(cherry picked from commit 351f0a124bffaa94d2a8abdec2e7dde5ae9c457d)
2014-04-24 12:33:01 +01:00
Andy Polyakov
0fb3d5b4fd bn/asm/armv4-gf2m.pl, modes/asm/ghash-armv4.pl: faster multiplication
algorithm suggested in following paper:

Câmara, D.; Gouvêa, C. P. L.; López, J. & Dahab, R.: Fast Software
Polynomial Multiplication on ARM Processors using the NEON Engine.

http://conradoplg.cryptoland.net/files/2010/12/mocrysen13.pdf
(cherry picked from commit f8cee9d081)
2014-04-24 10:27:52 +02:00
Andy Polyakov
ffdff9f12f aes/asm/bsaes-x86_64.pl: Atom-specific optimization.
(cherry picked from commit 558ff0f0c1)
2014-04-24 10:14:46 +02:00
Ben Laurie
a0fe2e72c4 Fix use after free. 2014-04-23 07:30:16 +01:00
Ben Laurie
3b21abfd6c Fix double frees.
Conflicts:
	CHANGES
2014-04-22 17:00:52 +01:00
Kaspar Brand
5aeb43393b Fix SSL_CTX_get{first,next}_certificate.
Fix typo that stopped SSL_CTX_get_{first,next}_certificate from working.
(cherry picked from commit 9330a85e04)
2014-04-21 16:53:48 +01:00
Dr. Stephen Henson
6e85eba11b Document -debug_decrypt option.
(cherry picked from commit 0dd5b94aeb)
2014-04-16 12:35:54 +01:00
Dr. Stephen Henson
5cd5e0219d Extension checking fixes.
When looking for an extension we need to set the last found
position to -1 to properly search all extensions.

PR#3309.
(cherry picked from commit 300b9f0b70)
2014-04-15 18:52:50 +01:00
Dr. Stephen Henson
9c1d63540f Clarify CMS_decrypt behaviour.
(cherry picked from commit 5f8e9a477a)
2014-04-15 18:19:26 +01:00
Dr. Stephen Henson
db34be4224 Add new key fingerprint.
(cherry picked from commit 3143a332e8)
2014-04-11 02:51:34 +01:00
Dr. Stephen Henson
b9ce05acc4 Fix free errors in ocsp utility.
Keep copy of any host, path and port values allocated by
OCSP_parse_url and free as necessary.
(cherry picked from commit 5219d3dd35)
2014-04-09 15:45:16 +01:00
Steven M. Schweda
6ef9d9bacf VMS build fix #2.
(cherry picked from commit a74bee5fc7)
2014-04-08 17:28:23 +01:00
Steven M. Schweda
40a44a7c3d VMS build fix for older compilers.
(cherry picked from commit 55c9e24875)
2014-04-07 23:15:31 +01:00
Dr. Stephen Henson
13738d5fa1 update CHANGES 2014-04-07 21:56:34 +01:00
Dr. Stephen Henson
363dede7a5 Update NEWS. 2014-04-07 21:32:56 +01:00
Dr. Stephen Henson
43866bd6fc update NEWS 2014-04-07 19:29:04 +01:00
Dr. Stephen Henson
cd29ced6de Return if ssleay_rand_add called with zero num.
Treat a zero length passed to ssleay_rand_add a no op: the existing logic
zeroes the md value which is very bad. OpenSSL itself never does this
internally and the actual call doesn't make sense as it would be passing
zero bytes of entropy.

Thanks to Marcus Meissner <meissner@suse.de> for reporting this bug.
(cherry picked from commit 5be1ae28ef)
2014-04-07 19:27:46 +01:00
Dr. Stephen Henson
7e840163c0 Add heartbeat extension bounds check.
A missing bounds check in the handling of the TLS heartbeat extension
can be used to reveal up to 64k of memory to a connected client or
server.

Thanks for Neel Mehta of Google Security for discovering this bug and to
Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm.org> for
preparing the fix (CVE-2014-0160)
(cherry picked from commit 96db9023b8)
2014-04-07 19:25:34 +01:00
Dr. Stephen Henson
a4896327e3 Document -verify_return_error option.
(cherry picked from commit 4e6c12f308)
2014-04-07 13:03:54 +01:00
Andy Polyakov
f396e9f4fc crypto/modes/gcm128.c: more strict aliasing fixes.
(cherry picked from commit 997d1aac7c)
2014-04-06 17:22:12 +02:00
Andy Polyakov
dacb698ada vpaes-[x86_64|ppc].pl: fix typo, which for some reason triggers rkhunter.
(cherry picked from commit 6eebcf3459)
2014-04-06 12:53:17 +02:00
Dr. Stephen Henson
6411b83e52 Set TLS padding extension value.
Enable TLS padding extension using official value from:

http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml
(cherry picked from commit cd6bd5ffda)

Conflicts:

	CHANGES
2014-04-05 20:49:09 +01:00
Dr. Stephen Henson
bb98beade9 Use correct length when prompting for password.
Use bufsiz - 1 not BUFSIZ - 1 when prompting for a password in
the openssl utility.

Thanks to Rob Mackinnon, Leviathan Security for reporting this issue.
(cherry picked from commit 7ba08a4d73)
2014-04-04 13:06:49 +01:00
Dr. Stephen Henson
b8d208c549 Update FAQ.
(cherry picked from commit 6cc0068430)
2014-04-04 13:05:56 +01:00
Dr. Stephen Henson
04f35a8909 Document new crl option.
(cherry picked from commit dbb7654dc1)
2014-04-03 13:35:48 +01:00
Tim Hudson
68bd06eb6e Add option to generate old hash format.
New -hash_old to generate CRL hashes using old
(before OpenSSL 1.0.0) algorithm.
(cherry picked from commit de2d97cd79)
2014-04-03 13:35:22 +01:00
Dr. Stephen Henson
686b616ea9 VMS build fix 2014-04-02 21:46:13 +01:00
Eric Young
0bb37c5e23 Fix base64 decoding bug.
A short PEM encoded sequence if passed to the BIO, and the file
had 2 \n following would fail.

PR#3289
(cherry picked from commit 10378fb5f4)
2014-04-02 19:57:06 +01:00