summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that sess_cert is not NULL before trying to use it.jsing2014-06-052-0/+16
| | | | | | Fixes CVE-2014-3470, from OpenSSL. ok deraadt@
* Avoid a buffer overflow that can be triggered by sending specially craftedjsing2014-06-052-2/+14
| | | | | | | | | | DTLS fragments. Fix for CVE-2014-0195, from OpenSSL. Reported to OpenSSL by Juri Aedla. ok deraadt@ beck@
* ssl_sess_cert_new() can return NULL. Fix two cases where the return valuejsing2014-06-052-26/+24
| | | | | | | | | is unchecked, which would result in a later null pointer dereference. While here, RSA_free, DH_free and EC_KEY_free all have implicit NULL checks, so avoid repeating them here. ok beck@
* Ensure that we do not process a ChangeCipherSpec with an empty masterjsing2014-06-052-2/+2
| | | | | | | | | secret. This is an additional safeguard against early ChangeCipherSpec handling. From OpenSSL. ok deraadt@
* Be selective as to when ChangeCipherSpec messages will be accepted.jsing2014-06-058-6/+32
| | | | | | | | | | | | | | | | | Without this an early ChangeCipherSpec message would result in session keys being generated, along with the Finished hash for the handshake, using an empty master secret. For a detailed analysis see: https://www.imperialviolet.org/2014/06/05/earlyccs.html This is a fix for CVE-2014-0224, from OpenSSL. This issue was reported to OpenSSL by KIKUCHI Masashi. Unfortunately the recent OpenSSL commit was the first we were made aware of the issue. ok deraadt@ sthen@
* More KNF.jsing2014-06-052-98/+64
|
* Sanitize use of client_opaque_prf_input: set it to NULL immediately aftermiod2014-06-042-36/+44
| | | | | | | | | | free()ing it, rather than in conditional code. Also do not bother setting server_opaque_prf_input (server, not client) to NULL in conditional code 10 lines after explicitely free()ing it and setting it to NULL (were the developers afraid of zombie pointers?) ok guenther@
* Fix a leak that can occur when len == 0, and as a result we leak a \0 byte.logan2014-06-042-2/+2
| | | | | | (From Frantisek Boranek) OK from miod@
* without overthinking it, replace a few memcmp calls with CRYPTO_memcmptedu2014-06-0410-16/+16
| | | | where it is feasible to do so. better safe than sorry.
* Fix memory leak.logan2014-06-032-0/+2
| | | | | | (From Martin Brejcha) OK from tedu@, miod@ and deraadt@
* Remove references to RANDFILE.jsing2014-06-021-19/+2
|
* Remove RANDFILE remnants.jsing2014-06-023-5/+0
|
* Remove details regarding -rand from the openssl man page.jsing2014-06-021-123/+3
|
* Stop pretending that openssl(1) applications support the -rand option.jsing2014-06-0215-123/+11
| | | | | | | | | | | | The underlying code has long been removed, making this a no-op. If your random subsystem actually requires that you seed it from a file, then you really should go and buy a new random subsystem that was built after 1990. Diff from Brent Cook. ok deraadt@
* A few months back there was a big community fuss regarding direct-usederaadt2014-06-0215-388/+2
| | | | | | | | | | | | of the intel RDRAND instruction. Consensus was RDRAND should probably only be used as an additional source of entropy in a mixer. Guess which library bends over backwards to provide easy access to RDRAND? Yep. Guess which applications are using this support? Not even one... but still, this is being placed as a trap for someone. Send this support straight to the abyss. ok kettenis
* Rename more variables for readability and consistency.jsing2014-06-022-50/+50
|
* move random bytes buffer to be part of mmaped pages; ok tedu@otto2014-06-021-21/+18
|
* Since pqueue is a private interface and the header defining the structguenther2014-06-022-8/+6
| | | | | | | | isn't even exported, there's no (sane) way for someone else to use the typedef. Eliminate the typedef and just use "struct _pqueue *". duplicate typedef pointed out by Brent Cook (busterb (at) gmail.com) ok miod@
* Clean up some of the nightmare of string and pointer arithmatic inbeck2014-06-012-104/+72
| | | | | | | | | | | | | this nasty function. This gets rid of the nasty tmp variables used to hold temporary strings and the DECIMAL_SIZE hack. it gets rid of the rather pointless null checks for buf (since the original code dereferences it before checking). It also gets rid of the insane possibility this could return -1 when stuff is using the return values to compute lengths All the failure cases now return 0 and an empty string like the first error case in the original code. ok miod@ tedu@
* realloc with NULL is same as mallocderaadt2014-06-012-8/+2
| | | | ok guenther
* Make usage for -quiet match the manpage and fix a misspellingguenther2014-06-011-2/+2
|
* Overhaul the key block handling in tls1_change_cipher_state() - usejsing2014-06-012-92/+132
| | | | | | | | | meaningful variable names with pointer arithmitic, rather than n, i, j and p with array indexing. Based on Adam Langley's chromium diffs. ok miod@
* In tls1_setup_key_block(), use the correct IV length for GCM mode, whichjsing2014-06-012-34/+48
| | | | | | | | | | results in the key block length calculation also being correct. Rename a number of variables so that their purpose becomes clear and simplify some of the code. Inspired by Adam Langley's chromium diffs. ok miod@
* There is no need for is{upper,lower}() tests before to{lower,uppper}(),deraadt2014-06-014-54/+16
| | | | | since all other characters are mapped through transparently. ok jsing
* Commit this before the head-scratching leads to premature baldness:deraadt2014-06-012-2/+2
| | | | | | | | | | | | | memset(a->data, 0, (unsigned int)a->max); but the decl is: size_t max; size_t could be larger than int, especially in some of the systems OpenSSL purports to support. How do _intentionally truncating_ casts like enter into a codebase? Lack of understanding of C, at a minimum. Generally the objects are small, but this code is _intentionally unready_ for large objects. ok miod
* Build with WARNINGS=Yes and Werror.miod2014-06-012-12/+4
|
* Remove __bio_h__attr__ wrapper around __attribute__, since earlier statementsmiod2014-06-012-20/+8
| | | | | | in this file directly use __attribute__. ok deraadt@
* Add a deprecated attribute to all CRYPTO_dbg_ functions.miod2014-06-012-20/+20
| | | | ok deraadt@
* Build these tests with WARNINGS=Yes and -Werror, and do the necessarymiod2014-06-0140-65/+143
| | | | fixes to keep building.
* Avoid the use of an uninitialised variable. In reality, this is a non-issuejsing2014-06-012-4/+2
| | | | | | | since the calculated value is not actually used in the uninitialised case. Change the code so that we only do the calculation if we actually need it. Issue detected by clang and reported by both brad@ and Brent Cook.
* EBCDIC support died a while ago, except in a comment.deraadt2014-06-012-4/+0
|
* Clean up the tls1_change_cipher_state() key length handling and use ajsing2014-06-012-20/+24
| | | | | | | | | single variable with a descriptive name, instead of two poorly named variables. Largely based on Adam Langley's chromium patches. ok miod@
* Use C99 initialisers for cipher_aliases. This improves readability,jsing2014-06-012-184/+664
| | | | | | | | removes the need for zero values to be specified (meaning that we usually specify two fields instead of 12), makes the field names grepable and protects from future field reordering/removal. ok beck@ miod@
* Get the public headers from the official place with <openssl/ >deraadt2014-05-3112-12/+14
| | | | from Brent Cook
* annoying whitespacederaadt2014-05-312-6/+6
|
* Change the actual default for returned asn1 strings to be utf8 in the code,beck2014-05-312-2/+2
| | | | | | | rather than only in the config file, to trip people up later. Found, and fix pleaded for by <spider@skuggor.se> who apparently spent hours chasing it down. ok miod@
* BUF_MEM_grow_clean() takes a size_t as the size argument. Remove false commentsmiod2014-05-314-18/+6
| | | | | | | mentioning it's an int, bogus (int) casts and bounds checks against INT_MAX (BUF_MEM_grow_clean has its own integer bounds checks). ok deraadt@
* Add a comment documenting where libssl depends upon the current (objectionable)miod2014-05-312-0/+2
| | | | behaviour of this code, to prevent people from blindly changing it.
* copy a comment placed in other files; req from miodderaadt2014-05-312-2/+6
|
* Some KNF and fix the vairable spelling.jsing2014-05-312-46/+32
|
* Move the cts128 and gcm128 tests to regress.jsing2014-05-319-924/+530
|
* More KNF.jsing2014-05-312-206/+244
|
* More manual OPENSSL_NO_EC and OPENSSL_NO_TLSEXT cleanup.jsing2014-05-318-28/+20
|
* unifdef -UDOXYGEN and manually remove the few doxygen comments that are notjsing2014-05-312-62/+0
| | | | | | wrapped in #ifdef DOXYGEN... Requested by miod@
* ECDH and ECDSA will not work overly well if there is no EC, so unifdefjsing2014-05-3116-100/+0
| | | | | | OPENSSL_NO_EC. ok tedu@
* TLS would not be entirely functional without extensions, so unifdefjsing2014-05-3130-360/+0
| | | | | | OPENSSL_NO_TLSEXT. ok tedu@
* Delete the extraneous "return" statement at the end of a void function.jca2014-05-311-2/+1
| | | | From Fritjof Bornebusch.
* KNF and other cleanup.jsing2014-05-312-266/+295
|
* Don't add potentially nasty stderr uses to dead CRYPTO_dbg_mem functions.deraadt2014-05-302-6/+6
| | | | | | | | But do use the abort(), which we are hoping all future vendors will move towards the more modern "do not flush streams"; hint hint, if you didn't do that already, there are grave risks because much software brings risk without that behaviour. We didn't cause the change.. POSIX did... ok beck
* Move sha256 and sha512 tests to regress and wire them up.jsing2014-05-307-332/+17
|