summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-06-18Use asprintf() instead of a fixed 128-byte size in SSL_CIPHER_description()Miod Vallat
when no storage buffer is passed. ok deraadt@ tedu@
2014-06-18In SSL_COMP_add_compression_method(), make sure error cases actually returnMiod Vallat
`error' rather than `success'. ok deraadt@
2014-06-17ssl_session_cmp is not a sort function, can use CRYPTO_memcmp here too.Ted Unangst
2014-06-15free iv, then cleanse. from Cyril JouveTed Unangst
2014-06-15Simplify EVP_MD_CTX_create() by just using calloc(). Also, use 0 ratherJoel Sing
than '\0' for several memset(). ok beck@ miod@
2014-06-15Simplify EVP_CIPHER_CTX_new() - stop pretending that EVP_CIPHER_CTX_init()Joel Sing
does something special... just use calloc() instead. ok beck@ miod@
2014-06-15Add missing OPENSSL_cleanse() in aead_aes_gcm_cleanup().Joel Sing
ok beck@ miod@
2014-06-15The OPENSSL_cleanse() in aes_gcm_cleanup() only cleans the gcm field of theJoel Sing
EVP_AES_GCM_CTX, leaving the AES key untouched - clean the entire context, rather than just part of it. ok beck@ miod@
2014-06-15Rename ssl3_record_sequence_update() to ssl3_record_sequence_increment(),Joel Sing
so that it reflects what it is actually doing. Use this function in a number of places that still have the hand rolled version. ok beck@ miod@
2014-06-14Add more bounded attributes to the buffer and md5/sha headers in libsslAnil Madhavapeddy
ok miod@
2014-06-13typoMiod Vallat
2014-06-13Correctly calculate the key block length when using export ciphers.Joel Sing
2014-06-13Swap compress/expand around so they are in the correct order - these endedJoel Sing
up in the wrong order when the code was refactored.
2014-06-13Add ChaCha20-Poly1305 based ciphersuites.Joel Sing
Based on Adam Langley's chromium patches. Tested by and ok sthen@
2014-06-13Switch the AES-GCM cipher suites to SSL_CIPHER_ALGORITHM2_AEAD.Joel Sing
2014-06-13Combine the MAC handling for both !EVP_CIPH_FLAG_AEAD_CIPHER andJoel Sing
EVP_CIPH_FLAG_AEAD_CIPHER into the same if/else block.
2014-06-13Add support for handling SSL_CIPHER_ALGORITHM2_AEAD ciphers, which areJoel Sing
those that use EVP_AEAD instead ov EVP_CIPHER. This means being able to change cipher state with an EVP_AEAD and being able to encrypt/decrypt TLS using the EVP_AEAD. This has no change on existing non-SSL_CIPHER_ALGORITHM2_AEAD ciphers. Based on Adam Langley's chromium patches. Rides the recent libssl bump. Tested by sthen@
2014-06-13Add an SSL_AEAD_CTX to enable the use of EVP_AEAD with an SSL cipher.Joel Sing
Read and write contexts are also added to the SSL_CTX, along with supporting code. Based on Adam Langley's chromium diffs. Rides the recent SSL library bump.
2014-06-13Remove support for the `opaque PRF input' extension, which draft has expiredMiod Vallat
7 years ago and never made it into an RFC. That code wasn't compiled in anyway unless one would define the actual on-the-wire extension id bytes; crank libssl major. With help and enlightenment from Brendan MacDonell.
2014-06-12replace atoi() calls with strtol(). Follow the idiomatic pattern in ourTheo de Raadt
manual page strictly. Return -2 if the strings are not strict numbers. The numbers remain in the range of "int". Range checking for these parameters is done later in the pkey_*_ctl() functions, or sometimes in functions much further downstream... but not always!!! ok millert miod mikeb
2014-06-12tags as requested by miod and teduTheo de Raadt
2014-06-11Stop setting the EVP_MD_CTX_FLAG_NON_FIPS_ALLOW - it has been ignored sinceJoel Sing
OpenSSL 1.0.0. ok miod@ (a little while back)
2014-06-11Tsk. Tsk. Someone forgot to compile test the other half.Joel Sing
2014-06-11Disable TLS support...Joel Sing
Just kidding! unifdef OPENSSL_NO_TLS since we will never want to actually do that. ok deraadt@
2014-06-11Provide support for non-funopen systems.Theo de Raadt
ok beck
2014-06-11More KNF.Joel Sing
2014-06-11Fix memory leak: free s if calloc fails.Loganaden Velvindron
(From Jonas Maebe) OK from beck@
2014-06-11c-file-style hints, begone; ok beckTheo de Raadt
2014-06-10Abandon the auto-ENGINE /dev/crypto interface. VIA 3des cbc receivesTheo de Raadt
collateral damage. The syncronous nature of this mechanism has hampered performance for symmetric crypto relative to brute-force cpu. The assymetric crypto support never really materialized in drivers. So abandon the complexity. ok tedu beck mikeb some disagrement from djm but if he wants to test /dev/crypto ciphers he should do it without this this gigantic API in the way
2014-06-10KNF.Joel Sing
2014-06-10KNF.Joel Sing
2014-06-10In tls1_cert_verify_mac(), check the return value of EVP_MD_CTX_copy_ex()Joel Sing
to avoid a possible NULL function call on ctx.final(). None of the callers currently check the return value of calls to cert_verify_mac(), however the function already returns 0 in another case and the MAC comparison will later fail. Issue reported by David Ramos.
2014-06-10Use C99 initialisers for EVP_MD structs, for clarity, grepability and toJoel Sing
protect from future field reordering/removal. No difference in generated assembly.
2014-06-09use memset instead of bzeroTheo de Raadt
2014-06-09do not include dso.h where it is not needed; ok miodTheo de Raadt
2014-06-08Add an SSL_CIPHER_ALGORITHM2_AEAD flag that is used to mark a cipher asJoel Sing
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 sprinklingJoel Sing
magic numbers around. ok deraadt@
2014-06-08No, we will not be building with OPENSSL_NO_X509_VERIFY. Nuke it andJoel Sing
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 NULLJoel Sing
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.Joel Sing
2014-06-08Stop using DSO_global_lookup to reach getaddrinfo() and friendsTheo de Raadt
discussed with tedu, ok jsing
2014-06-08Factor out the part of tls1_change_cipher_state() that is specific toJoel Sing
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.Joel Sing
2014-06-07http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=2016265dfbab162e ↵Theo de Raadt
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().Joel Sing
Based on Adam Langley's chromium patches.
2014-06-07Use !is_read to imply SSL3_CC_WRITE.Joel Sing
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, sinceJoel Sing
this is the only place where these variables are used.
2014-06-07Remove pointless casts - no binary change.Joel Sing
2014-06-07Rename variables to make it clear that these are only used in the exportJoel Sing
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().Joel Sing
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).