Commit graph

11961 commits

Author SHA1 Message Date
Andy Polyakov
558ff0f0c1 aes/asm/bsaes-x86_64.pl: Atom-specific optimization. 2014-04-24 10:13:30 +02:00
Ben Laurie
94d1f4b0f3 Fix use after free. 2014-04-23 07:24:03 +01:00
Ben Laurie
4ba5e63bfd Fix double frees. 2014-04-22 16:58:43 +01:00
Kaspar Brand
9330a85e04 Fix SSL_CTX_get{first,next}_certificate.
Fix typo that stopped SSL_CTX_get_{first,next}_certificate from working.
2014-04-21 16:52:28 +01:00
Dr. Stephen Henson
0dd5b94aeb Document -debug_decrypt option. 2014-04-16 12:15:43 +01:00
Dr. Stephen Henson
300b9f0b70 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.
2014-04-15 18:50:53 +01:00
Dr. Stephen Henson
5f8e9a477a Clarify CMS_decrypt behaviour. 2014-04-15 18:17:12 +01:00
Dr. Stephen Henson
3143a332e8 Add new key fingerprint. 2014-04-11 02:50:51 +01:00
Dr. Stephen Henson
5219d3dd35 Fix free errors in ocsp utility.
Keep copy of any host, path and port values allocated by
OCSP_parse_url and free as necessary.
2014-04-09 15:42:40 +01:00
Dr. Stephen Henson
476830fd5b ssleay_rand_add returns a value in 1.1.0 2014-04-09 15:35:51 +01:00
Dr. Stephen Henson
86f6e8669c Update NEWS 2014-04-08 22:31:14 +01:00
Dr. Stephen Henson
f74fa33bce 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:44:45 +01:00
Dr. Stephen Henson
731f431497 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:44:38 +01:00
Dr. Stephen Henson
4e6c12f308 Document -verify_return_error option. 2014-04-07 13:02:39 +01:00
Andy Polyakov
997d1aac7c crypto/modes/gcm128.c: more strict aliasing fixes. 2014-04-06 17:19:54 +02:00
Andy Polyakov
6eebcf3459 vpaes-[x86_64|ppc].pl: fix typo, which for some reason triggers rkhunter. 2014-04-06 12:50:36 +02:00
Dr. Stephen Henson
cd6bd5ffda 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
2014-04-05 20:43:54 +01:00
Dr. Stephen Henson
f8dd55bb5b For more than 160 bits of security disable SHA1 HMAC 2014-04-05 13:39:35 +01:00
Dr. Stephen Henson
b7e46a9bce Update security framework docs. 2014-04-05 13:29:41 +01:00
Dr. Stephen Henson
6cc0068430 Update FAQ. 2014-04-04 12:46:39 +01:00
Dr. Stephen Henson
7ba08a4d73 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.
2014-04-04 12:44:43 +01:00
Dr. Stephen Henson
dbb7654dc1 Document new crl option. 2014-04-03 13:33:50 +01:00
Tim Hudson
de2d97cd79 Add option to generate old hash format.
New -hash_old to generate CRL hashes using old
(before OpenSSL 1.0.0) algorithm.
2014-04-03 13:26:32 +01:00
Eric Young
10378fb5f4 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
2014-04-02 19:54:27 +01:00
Dr. Stephen Henson
b48310627d Don't try and verify signatures if key is NULL (CVE-2013-0166)
Add additional check to catch this in ASN1_item_verify too.
(cherry picked from commit 66e8211c0b)
2014-04-01 16:37:51 +01:00
Ben Laurie
5a49001bde Fix warning. 2014-03-29 19:51:58 +00:00
Dr. Stephen Henson
0f817d3b27 Add initial security framework docs. 2014-03-28 16:42:18 +00:00
Dr. Stephen Henson
21e0c1d23a Set security level in cipher string.
Allow setting of security level in cipher string using the
@SECLEVEL=N syntax.
2014-03-28 14:56:43 +00:00
Dr. Stephen Henson
77a926e676 Set security level to zero is ssltest
Since ssltest needs to test low security ciphersuites and keys
set security level to zero so they aren't rejected.
2014-03-28 14:56:43 +00:00
Dr. Stephen Henson
e03c5b59f0 Security callback debug print out.
Add a debugging security callback option to s_client/s_server. This will
print out each security parameter as it is accepted or rejected.
2014-03-28 14:56:43 +00:00
Dr. Stephen Henson
b362ccab5c Security framework.
Security callback: selects which parameters are permitted including
sensible defaults based on bits of security.

The "parameters" which can be selected include: ciphersuites,
curves, key sizes, certificate signature algorithms, supported
signature algorithms, DH parameters, SSL/TLS version, session tickets
and compression.

In some cases prohibiting the use of a parameters will mean they are
not advertised to the peer: for example cipher suites and ECC curves.
In other cases it will abort the handshake: e.g DH parameters or the
peer key size.

Documentation to follow...
2014-03-28 14:56:30 +00:00
Dr. Stephen Henson
66f96fe2d5 Check return value of ssl3_output_cert_chain 2014-03-28 14:49:04 +00:00
Dr. Stephen Henson
8b8e5bed23 Allow return of supported ciphers.
New function ssl_cipher_disabled.

Check for disabled client ciphers using ssl_cipher_disabled.

New function to return only supported ciphers.

New option to ciphers utility to print only supported ciphers.
2014-03-28 14:49:04 +00:00
Dr. Stephen Henson
09599b52d4 Auto DH support.
Add auto DH parameter support. This is roughly equivalent to the
ECDH auto curve selection but for DH. An application can just call

SSL_CTX_set_auto_dh(ctx, 1);

and appropriate DH parameters will be used based on the size of the
server key.

Unlike ECDH there is no way a peer can indicate the range of DH parameters
it supports. Some peers cannot handle DH keys larger that 1024 bits for
example. In this case if you call:

SSL_CTX_set_auto_dh(ctx, 2);

Only 1024 bit DH parameters will be used.

If the server key is 7680 bits or more in size then 8192 bit DH parameters
will be used: these will be *very* slow.

The old export ciphersuites aren't supported but those are very
insecure anyway.
2014-03-28 14:49:04 +00:00
Dr. Stephen Henson
2514fa79ac Add functions returning security bits.
Add functions to return the "bits of security" for various public key
algorithms. Based on SP800-57.
2014-03-28 14:49:04 +00:00
Dr. Stephen Henson
4563da1d7c Fix memory leak with client auth.
(cherry picked from commit bc5ec653ba)
2014-03-27 16:12:59 +00:00
Dr. Stephen Henson
f0ef019da2 Add -no_resumption_on_reneg to SSL_CONF.
(cherry picked from commit 1f44dac24d)
2014-03-27 16:12:40 +00:00
Dr. Stephen Henson
e970f63dc0 Update chain building function.
Don't clear verification errors from the error queue unless
SSL_BUILD_CHAIN_FLAG_CLEAR_ERROR is set.

If errors occur during verification and SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR
is set return 2 so applications can issue warnings.
(cherry picked from commit 2dd6976f6d)
2014-03-27 14:24:40 +00:00
Emilia Kasper
7c5718be27 Allow duplicate certs in ssl_build_cert_chain 2014-03-24 12:33:54 +01:00
Dr. Stephen Henson
3a98f9cf20 Workaround for some CMS signature formats.
Some CMS SignedData structure use a signature algorithm OID such
as SHA1WithRSA instead of the RSA algorithm OID. Workaround this
case by tolerating the signature if we recognise the OID.
2014-03-19 17:28:01 +00:00
Piotr Sikora
f04665a653 Retry callback only after ClientHello received. 2014-03-18 23:55:32 +00:00
Dr. Stephen Henson
14c67a7004 Update ordinals.
Use a previously unused value as we will be updating multiple released
branches.
(cherry picked from commit 0737acd2a8)
2014-03-12 14:42:08 +00:00
Dr. Stephen Henson
f9b6c0ba4c 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.
(cherry picked from commit 2198be3483)

Conflicts:

	CHANGES
2014-03-12 14:29:43 +00:00
Dr. Stephen Henson
a029788b0e typo 2014-03-10 15:47:33 +00:00
Dr. Stephen Henson
d628885e9a Simplify ssl_add_cert_chain logic. 2014-03-10 15:47:33 +00:00
Dr. Stephen Henson
ab0f880433 Remove -WX option from debug-VC-WIN32
(cherry picked from commit 7a3e67f029969620966b8a627b8485d83692cca5)
2014-03-07 19:07:52 +00:00
Andy Polyakov
ea38f02049 engines/ccgost/gosthash.c: simplify and avoid SEGV.
PR: 3275
2014-03-07 11:02:25 +01:00
Andy Polyakov
5e44c144e6 SPARC T4 assembly pack: treat zero input length in CBC.
The problem is that OpenSSH calls EVP_Cipher, which is not as
protective as EVP_CipherUpdate. Formally speaking we ought to
do more checks in *_cipher methods, including rejecting
lengths not divisible by block size (unless ciphertext stealing
is in place). But for now I implement check for zero length in
low-level based on precedent.

PR: 3087, 2775
2014-03-07 10:30:37 +01:00
Andy Polyakov
53e5161231 dh_check.c: check BN_CTX_get's return value. 2014-03-06 14:19:37 +01:00
Andy Polyakov
687403fb24 test/Makefile: allow emulated test (e.g. under wine).
Submitted by: Roumen Petrov
2014-03-06 14:08:02 +01:00