9913 Commits

Author SHA1 Message Date
Günther Noack
12cbba0d54 Avoid out-of-bounds write in SSL_get_shared_ciphers
PR: 3317
2014-05-11 23:59:38 +01:00
Viktor Dukhovni
f9f6befa1f Fix infinite loop. PR#3347 2014-05-11 21:15:57 +01:00
Tim Hudson
0552cbcdaa safety check to ensure we dont send out beyond the users buffer 2014-05-11 13:33:57 +01:00
Dr. Stephen Henson
c3cd9be01f 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 83a3182e0560f76548f4378325393461f6275493)
2014-05-09 14:24:49 +01:00
Tim Hudson
9f4a47b3ed coverity 966576 - close socket in error path 2014-05-08 23:24:56 +01:00
Tim Hudson
51080676f1 PR#3342 fix resource leak coverity issue 966577 2014-05-08 23:24:51 +01:00
Tim Hudson
1535ff91e1 fix coverity issue 966597 - error line is not always initialised 2014-05-08 00:04:16 +01:00
Matt Caswell
79c8c47d5c Fixed NULL pointer dereference in PKCS7_dataDecode reported by David Ramos in PR#3339 2014-05-07 23:28:26 +01:00
Geoff Thorpe
84fe686173 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:15:43 -04:00
Geoff Thorpe
44ea88c26e 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:15:41 -04:00
Geoff Thorpe
f4e6975590 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:15:37 -04:00
Dr. Stephen Henson
3dd101aa4d Initialize num properly.
PR#3289
PR#3345
(cherry picked from commit 3ba1e406c2309adb427ced9815ebf05f5b58d155)
2014-05-06 14:09:21 +01:00
Dr. Stephen Henson
ba44b8d42e Set Enveloped data version to 2 if ktri version not zero.
(cherry picked from commit 9c5d953a07f472452ae2cb578e39eddea2de2b9c)
2014-05-06 14:04:37 +01:00
David Ramos
7cdbce53f1 Double free in i2o_ECPublicKey
PR: 3338
2014-05-04 00:56:13 +01:00
Jeff Trawick
1ff9f2eed3 typo in SSL_get_peer_cert_chain docs
RT: 3304
2014-05-02 00:29:31 +01:00
Matt Caswell
ee30926671 Fixed missing =back commands 2014-04-30 23:58:24 +01:00
Lubomir Rintel
3d50fef7d7 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:50:21 +01:00
mancha
33c162301a Fix version documentation.
Specify -f is for compilation flags. Add -d to synopsis section.

(cherry picked from commit 006397ea62bbcae22c8664d53c2222b808c4bdd1)

Closes #80.
2014-04-26 11:24:14 +01:00
mancha
3abcf477a9 Fix eckey_priv_encode()
Fix eckey_priv_encode to return an error on failure of i2d_ECPrivateKey.
2014-04-24 19:33:01 +00:00
Steve Marquess
986fa907ae Add new sponsors
(cherry picked from commit 351f0a124bffaa94d2a8abdec2e7dde5ae9c457d)
2014-04-24 12:32:58 +01:00
Ben Laurie
e4e1b8f230 Fix use after free. 2014-04-23 07:33:26 +01:00
mancha
da8f10881e Fix double frees.
Conflicts:
	CHANGES
2014-04-22 22:52:26 +01:00
Dr. Stephen Henson
ebbbc8bd1c Document -debug_decrypt option.
(cherry picked from commit 0dd5b94aeb77c2982bdf6886962b7a8491c6c9ed)
2014-04-16 12:36:21 +01:00
Dr. Stephen Henson
bddd6e3495 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 300b9f0b704048f60776881f1d378c74d9c32fbd)
2014-04-15 18:53:14 +01:00
Dr. Stephen Henson
6fc530e6a0 Clarify CMS_decrypt behaviour.
(cherry picked from commit 5f8e9a477a18551052f2019c1f374061acbaa5e6)
2014-04-15 18:19:50 +01:00
Dr. Stephen Henson
d24e8ac25b Add new key fingerprint.
(cherry picked from commit 3143a332e8f2f5ca1a6f0262a1a1a66103f2adf7)
2014-04-11 02:51:59 +01:00
Dr. Stephen Henson
06e17142fc 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 5219d3dd350cc74498dd49daef5e6ee8c34d9857)
2014-04-09 15:45:46 +01:00
Dr. Stephen Henson
f82596346b Document -verify_return_error option.
(cherry picked from commit 4e6c12f3088d3ee5747ec9e16d03fc671b8f40be)
2014-04-07 13:05:46 +01:00
Andy Polyakov
38b4d7aab1 crypto/modes: strict aliasing fixes from master. 2014-04-06 17:23:55 +02:00
Dr. Stephen Henson
f16fede1cd 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 7ba08a4d73c1bdfd3aced09a628b1d7d7747cdca)
2014-04-04 13:08:42 +01:00
Dr. Stephen Henson
4a15b7c625 Update FAQ.
(cherry picked from commit 6cc0068430d0a4abdef0b466d422e6a4d154a5fe)
2014-04-04 13:08:39 +01:00
Dr. Stephen Henson
065b75d3b7 Document new crl option.
(cherry picked from commit dbb7654dc189992966ecd95ca66f7a3bb011ab9b)
2014-04-03 13:38:00 +01:00
Tim Hudson
75c3073bbf 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 de2d97cd799f38024d70847bab37d91aa5a2536e)
2014-04-03 13:37:56 +01:00
Eric Young
5762c18517 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 10378fb5f4c67270b800e8f7c600cd0548874811)
2014-04-02 19:57:57 +01:00
Dr. Stephen Henson
6a1dd28576 update NEWS 2014-03-12 14:43:03 +00:00
Dr. Stephen Henson
0737acd2a8 Update ordinals.
Use a previously unused value as we will be updating multiple released
branches.
2014-03-12 14:41:00 +00:00
Dr. Stephen Henson
2198be3483 Fix for CVE-2014-0076
Fix for the attack described in the paper "Recovering OpenSSL
ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack"
by Yuval Yarom and Naomi Benger. Details can be obtained from:
http://eprint.iacr.org/2014/140

Thanks to Yuval Yarom and Naomi Benger for discovering this
flaw and to Yuval Yarom for supplying a fix.
2014-03-12 14:16:19 +00:00
Dr. Stephen Henson
6fe498497c typo
(cherry picked from commit a029788b0e0c19cee4007cc1f73201cf2c13addf)
2014-03-10 15:49:35 +00:00
Andy Polyakov
ce2c6d8452 engines/ccgost/gosthash.c: simplify and avoid SEGV.
PR: 3275
(cherry picked from commit ea38f020492042bc1d1adc26ef197b0b9cadf968)
2014-03-07 11:04:10 +01:00
Dr. Stephen Henson
e67c71c8fd Fix for WIN32 builds with KRB5
(cherry picked from commit 3eddd1706a30cdf3dc9278692d8ee9038eac8a0d)
2014-02-26 15:33:31 +00:00
Andy Polyakov
ffa0e16198 ssl/t1_enc.c: check EVP_MD_CTX_copy return value.
PR: 3201
(cherry picked from commit 03da57fe14f2de5bde9d4496a2ae9a4ae8879f88)
2014-02-25 22:24:52 +01:00
Dr. Stephen Henson
910b3a81fd Avoid Windows 8 Getversion deprecated errors.
Windows 8 SDKs complain that GetVersion() is deprecated.

We only use GetVersion like this:

	(GetVersion() < 0x80000000)

which checks if the Windows version is NT based. Use a macro check_winnt()
which uses GetVersion() on older SDK versions and true otherwise.
(cherry picked from commit a4cc3c8041104896d51ae12ef7b678c31808ce52)
2014-02-25 13:43:04 +00:00
Andy Polyakov
24a47191f3 BC-32.pl: pre-1.0.2-specific refresh for Borland C.
PR: 3251
Suggested by: Thorsten Schning
(cherry picked from commit 3ae1b53496acd3f25e9b9089ed5fb6000e41a557)
2014-02-24 16:55:46 +01:00
Andy Polyakov
4ba2edd2a5 BC-32.pl: refresh Borland C support.
PR: 3251
Suggested by: Thorsten Schning
(cherry picked from commit 779c51c6446f384c2f2a7bd5cc4c3e0366baf628)
2014-02-24 16:49:50 +01:00
Andy Polyakov
4f5b7a76da x509/by_dir.c: fix run-away pointer (and potential SEGV)
when adding duplicates in add_cert_dir.

PR: 3261
Reported by: Marian Done
(cherry picked from commit 758954e0d8232d370ed72b7f86640e40443e1778)
2014-02-24 15:24:14 +01:00
Dr. Stephen Henson
8fe4d5bedb Remove duplicate statement.
(cherry picked from commit 5a7652c3e585e970e5b778074c92e617e48fde38)
2014-02-15 01:29:49 +00:00
Kurt Roeckx
d43301b77a Use defaults bits in req when not given
If you use "-newkey rsa" it's supposed to read the default number of bits from the
config file.  However the value isn't used to generate the key, but it does
print it's generating such a key.  The set_keygen_ctx() doesn't call
EVP_PKEY_CTX_set_rsa_keygen_bits() and you end up with the default set in
pkey_rsa_init() (1024).  Afterwards the number of bits gets read from the config
file, but nothing is done with that anymore.

We now read the config first and use the value from the config file when no size
is given.

PR: 2592
(cherry picked from commit 3343220327664680420d4068e1fbe46d2236f1b0)
2014-02-14 22:36:05 +00:00
Kurt Roeckx
4727d57400 Fix additional pod errors with numbered items.
(cherry picked from commit e547c45f1c74e976656c042ec9d873f6eea0e756)
2014-02-14 22:36:04 +00:00
Scott Schaefer
b815ab2101 Fix various spelling errors
(cherry picked from commit 2b4ffc659eabec29f76821f0ac624a2b8c19e4c7)
2014-02-14 22:36:04 +00:00
Scott Schaefer
ffaebdf38c Document pkcs12 -password behavior
apps/pkcs12.c accepts -password as an argument.  The document author
almost certainly meant to write "-password, -passin".

However, that is not correct, either.  Actually the code treats
-password as equivalent to -passin, EXCEPT when -export is also
specified, in which case -password as equivalent to -passout.
(cherry picked from commit 856c6dfb09d69fc82ada2611c6cd792dfc60e355)
2014-02-14 22:36:04 +00:00