Commit graph

11296 commits

Author SHA1 Message Date
Ben Laurie
4ceb430a46 Don't allocate more than is needed in BUF_strndup(). 2014-05-20 13:53:35 +01:00
Dr. Stephen Henson
81ce94f8dc For portability use BUF_strndup instead of strndup.
(cherry picked from commit dcca7b13e9)
2014-05-20 11:22:33 +01:00
Dr. Stephen Henson
feaa3b380b Adding padding extension to trace code.
(cherry picked from commit 6db14dbc51)
2014-05-20 11:22:15 +01:00
Janpopan
5d8e9f2ae0 Fix a wrong parameter count ERR_add_error_data 2014-05-19 22:15:27 +01:00
Ben Laurie
6c1d36a649 Merge branch 'mbland-heartbeat-test-1.0.2' into OpenSSL_1_0_2-stable 2014-05-19 18:04:41 +01:00
Mike Bland
2312a84ca1 Unit/regression test for TLS heartbeats.
Regression test against CVE-2014-0160 (Heartbleed).

More info: http://mike-bland.com/tags/heartbleed.html

(based on commit 35cb55988b75573105eefd00d27d0138eebe40b1)
2014-05-18 10:23:59 -04:00
Matt Caswell
a99d2a22e1 Moved note about lack of support for AEAD modes out of BUGS section to SUPPORTED CIPHERS section (bug has been fixed, but still no support for AEAD) 2014-05-15 21:15:21 +01:00
Dr. Stephen Henson
2fa65aa7d8 Enc doesn't support AEAD ciphers.
(cherry picked from commit 09184dddead165901700b31eb39d540ba30f93c5)
2014-05-15 14:16:45 +01:00
Jeffrey Walton
4907cf0845 Fix grammar error in verify pod. PR#3355 2014-05-14 22:58:19 +01:00
Jeffrey Walton
28b4820f70 Add information to BUGS section of enc documentation. PR#3354 2014-05-14 22:58:19 +01:00
Michal Bozon
72967d5be9 Corrected POD syntax errors. PR#3353 2014-05-14 22:58:19 +01:00
Mike Frysinger
4aebb2c8b8 Have the .pc files depend on each other rather than duplicating the
various link settings. PR#3332
2014-05-12 23:33:35 +01:00
Kurt Roeckx
1f5bce2dce Check sk_SSL_CIPHER_num() after assigning sk. 2014-05-12 22:59:11 +01:00
Jean-Paul Calderone
b953b02849 Correct the return type on the signature for X509_STORE_CTX_get_ex_data given in the pod file. 2014-05-12 22:49:00 +01:00
Serguei E. Leontiev
d6e55b4001 Replace manual ASN1 decoder with ASN1_get_object
Replace manual ASN.1 decoder with ASN1_get object. This
will decode the tag and length properly and check against
it does not exceed the supplied buffer length.

PR#3335
(cherry picked from commit b0308dddd1cc6a8e1de803ef29ba6da25ee072c2)
2014-05-12 18:41:51 +01:00
Matt Caswell
f710c3f198 Fixed NULL pointer dereference. See PR#3321 2014-05-12 00:39:43 +01:00
Kurt Roeckx
99a3d167d9 Set authkey to NULL and check malloc return value. 2014-05-12 00:22:52 +01:00
Martin Brejcha
c622649513 dgram_sctp_ctrl: authkey memory leak
PR: 3327
2014-05-12 00:22:52 +01:00
Günther Noack
8571902e23 Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317
2014-05-11 23:55:06 +01:00
Viktor Dukhovni
711bb9bc88 Fix infinite loop. PR#3347 2014-05-11 21:09:56 +01:00
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