summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/div.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-06-10mop up ifndef KERNEL goo; ok miodderaadt12-60/+12
2014-06-09use memset instead of bzeroderaadt2-4/+4
2014-06-09do not include dso.h where it is not needed; ok miodderaadt6-6/+0
2014-06-09More KNF.jsing1-11/+11
2014-06-08Add an SSL_CIPHER_ALGORITHM2_AEAD flag that is used to mark a cipher asjsing4-0/+114
using EVP_AEAD. Also provide an EVP_AEAD-only equivalent of ssl_cipher_get_evp().
2014-06-08Add a define for the SSLv3 sequence size and use it, rather than sprinklingjsing7-14/+16
magic numbers around. ok deraadt@
2014-06-08No, we will not be building with OPENSSL_NO_X509_VERIFY. Nuke it andjsing2-28/+16
do some other clean up while here. ok deraadt@
2014-06-08Clean up BIO_free() handling in bio_ssl.c - BIO_free() has its own NULLjsing2-26/+32
check, so do not duplicate it here. Make the error handling consistent by always using 'goto err' rather than returning in certain cases. Also add a missing BIO_free(ssl) in BIO_new_ssl_connect(). ok deraadt@
2014-06-08Be explicit with types. No binary change.jsing2-6/+6
2014-06-08Stop using DSO_global_lookup to reach getaddrinfo() and friendsderaadt2-80/+6
discussed with tedu, ok jsing
2014-06-08Factor out the part of tls1_change_cipher_state() that is specific tojsing6-252/+310
switching cipher states using an EVP_CIPHER. This will facilitate the addition of cipher state changes for EVP_AEAD. No functional change. Based on Adam Langley's chromium patches.
2014-06-08Factor out the sequence number reset code to aid in upcoming changes.jsing2-16/+20
2014-06-07/* on some platforms time_t may be a float */deraadt1-3/+3
In the past, time_t's type was underspecified. But a floating point type would not have worked in practice. Newer specifications effectively forbid it. While cleaning this up, get partly ready for Y2038. ok miod
2014-06-07http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=2016265dfbab162e ↵deraadt14-86/+12
c30718b5e7480add42598158 Don't know the full story, but it looks like a "can't do random perfectly, so do it god awful" problem was found in 2013, and replaced with "only do it badly if a flag is set". New flags (SSL_MODE_SEND_SERVERHELLO_TIME and SSL_MODE_SEND_SERVERHELLO_TIME) were added [Ben Laurie?] to support the old scheme of "use time_t for first 4 bytes of the random buffer". Nothing uses these flags [ecosystem scan by sthen] Fully discourage use of these flags in the future by removing support & definition of them. The buflen < 4 check is also interesting, because no entropy would be returned. No callers passed such small buffers. ok miod sthen
2014-06-07Add missing NULL check after calling EVP_PKEY_new_mac_key().jsing2-0/+4
Based on Adam Langley's chromium patches.
2014-06-07Use !is_read to imply SSL3_CC_WRITE.jsing2-6/+4
While this is not strictly correct (since the presence of SSL3_CC_READ does not guarantee the absence of SSL3_CC_WRITE), in practice only one of these flags is set at a time and there is existing logic which already relies on this behaviour.
2014-06-07Move the export label initialisation into the export handling code, sincejsing2-12/+22
this is the only place where these variables are used.
2014-06-07Remove pointless casts - no binary change.jsing2-4/+4
2014-06-07Rename variables to make it clear that these are only used in the exportjsing2-30/+36
code. Additionally, these need to be cleaned in the export case. Based on Adam Langley's chromium patches.
2014-06-07Further clean up of context handling in tls1_change_cipher_state().jsing2-42/+34
Rather than doing a complex dance to figure out if we should reuse the cipher context and clean it later on, just free it and allocate a new one. This simplifies the code path, especially in the write case where special handling is required for DTLS. Also, calling EVP_CIPHER_CTX_init() for a newly created cipher context is unnecessary, since EVP_CIPHER_CTX_new() already does this (not to mention that it was already missing from the write case).
2014-06-07Remove various test stubs. The good ones have been moved by jsingderaadt48-5814/+0
and others to the regress framework. These remaining ones just muddle us up when re-reading code repeatedly. ok jsing
2014-06-07evptests.txt lives in regress/lib/libcrypto/evpjsing2-668/+0
2014-06-07malloc() result does not need a cast.deraadt108-163/+159
ok miod
2014-06-07Remove another NULL check before a BIO_free().jsing2-8/+8
2014-06-07ssl3_free_digest_list() has its own NULL check.jsing3-13/+9
2014-06-07BIO_free has an implicit NULL check, so do not bother checking for NULLjsing7-42/+21
before calling it.
2014-06-07ssl3_release_{read,write}_buffer() handle being called with NULL buffers,jsing2-8/+6
so do not bother checking before calling.
2014-06-07The DH_free, EC_KEY_free, EVP_PKEY_free and RSA_free functions all havejsing10-158/+88
implicit NULL checks, so there is no point ensuring that the pointer is non-NULL before calling them.
2014-06-07More KNF.jsing2-12/+8
2014-06-07More KNF.jsing2-38/+44
2014-06-07Add basic regression test for modf() issue.tobiasu3-2/+40
encouraged by deraadt and miod
2014-06-06s/assember/assembler/ before someone gets offended. At the lastderaadt21-34/+34
hackathon, just saying 'ass ember' was enough to start giggles. Unfortunately far more offensive stuff remains in here...
2014-06-05Do not recurse when a 'Hello Request' message is received while gettingjsing2-2/+4
DTLS fragments. A stream of 'Hello Request' messages will result in infinite recursion, eventually crashing the DTLS client or server. Fixes CVE-2014-0221, from OpenSSL. Reported to OpenSSL by Imre Rad.
2014-06-05Ensure that sess_cert is not NULL before trying to use it.jsing2-0/+16
Fixes CVE-2014-3470, from OpenSSL. ok deraadt@
2014-06-05Avoid a buffer overflow that can be triggered by sending specially craftedjsing2-2/+14
DTLS fragments. Fix for CVE-2014-0195, from OpenSSL. Reported to OpenSSL by Juri Aedla. ok deraadt@ beck@
2014-06-05ssl_sess_cert_new() can return NULL. Fix two cases where the return valuejsing2-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@
2014-06-05Ensure that we do not process a ChangeCipherSpec with an empty masterjsing2-2/+2
secret. This is an additional safeguard against early ChangeCipherSpec handling. From OpenSSL. ok deraadt@
2014-06-05Be selective as to when ChangeCipherSpec messages will be accepted.jsing8-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@
2014-06-05More KNF.jsing2-98/+64
2014-06-04Sanitize use of client_opaque_prf_input: set it to NULL immediately aftermiod2-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@
2014-06-04Fix a leak that can occur when len == 0, and as a result we leak a \0 byte.logan2-2/+2
(From Frantisek Boranek) OK from miod@
2014-06-04without overthinking it, replace a few memcmp calls with CRYPTO_memcmptedu10-16/+16
where it is feasible to do so. better safe than sorry.
2014-06-03Fix memory leak.logan2-0/+2
(From Martin Brejcha) OK from tedu@, miod@ and deraadt@
2014-06-02Remove references to RANDFILE.jsing1-19/+2
2014-06-02Remove RANDFILE remnants.jsing3-5/+0
2014-06-02Remove details regarding -rand from the openssl man page.jsing1-123/+3
2014-06-02Stop pretending that openssl(1) applications support the -rand option.jsing15-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@
2014-06-02A few months back there was a big community fuss regarding direct-usederaadt15-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
2014-06-02Rename more variables for readability and consistency.jsing2-50/+50
2014-06-02move random bytes buffer to be part of mmaped pages; ok tedu@otto1-21/+18