summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-06-13Overhaul the keyblock handling in ssl3_change_cipher_state(). UseJoel Sing
meaningful variable names with use with pointer arithmitic rather than complex array indexing.
2014-06-13Correctly calculate the key block length when used with export ciphers.Joel Sing
While here, use meaningful variable names and simplify the calculation.
2014-06-13Remove deprecated RFC2292 ancillary data convenience functions.Christopher Zimmermann
They are obsoleted by the RFC3542 api. ok mpi@
2014-06-13use getgentropy() call. If it fails, things are pretty bad --Theo de Raadt
call abort(). this direction discussed at length with miod beck tedu matthew etc
2014-06-13use getentropy; from matthewTheo de Raadt
2014-06-13Use meaningful variable names, rather than i, j, k and cl.Joel Sing
2014-06-13Do not bother trying to work out of we can reuse a cipher context - justJoel Sing
throw it away and create a new one. This simplifies the code and also allows ASR to do its thing.
2014-06-13Separate the comression handling from the cipher/message digest handling inJoel Sing
ssl3_change_cipher_state().
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-13The export_key/export_iv variables are only used in the is_export case.Joel Sing
Also use c rather than &c[0].
2014-06-13Rename a bunch of variables in ssl3_change_cipher_state() for readability.Joel Sing
This also brings it inline with tls1_change_cipher_state_cipher().
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-13Use SSL3_SEQUENCE_SIZE and if we're going to preincrement we may as wellJoel Sing
do it properly.
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-13delete a lie; replace with a truthTheo de Raadt
2014-06-13Add new getentropy() system call. Code and pressure from matthew.Theo de Raadt
I accepted that he's right (again) to seperate this out from heavy sysctl API and this will simply a variety of things. Functionname is not used by anyone in the ports tree, so we guess we can use it. Shocking that no application has a function called this. ok matthew & others who pushed him to start this early on
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-13crank majorTheo de Raadt
2014-06-13Add timingsafe_memcmp().Matthew Dempsky
ok deraadt, jmc, tedu
2014-06-13Add support for MAP_INHERIT_ZERO.Matthew Dempsky
This provides a way for a process to designate pages in its address space that should be replaced by fresh, zero-initialized anonymous memory in forked child processes, rather than being copied or shared. ok jmc, kettenis, tedu, deraadt; positive feedback from many more
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-12Disable the "switch to insertion sort" optimization to avoid quadraticTodd C. Miller
behavior for certain inputs. From NetBSD. OK tedu@
2012-10-13import OpenSSL-1.0.1cDamien Miller
2010-10-01import OpenSSL-1.0.0aDamien Miller
2008-09-06import of OpenSSL 0.9.8hDamien Miller
2006-06-27import of openssl-0.9.7jDamien Miller
2014-06-11Really remove the obsolete manpages left by earlier commitChristopher Zimmermann
which just emptied the file but didn't remove it.
2014-06-11Remove manpages about deprecated RFC2292 ancillary data convenience functions.Christopher Zimmermann
They are obsoleted by the RFC3542 api. ok mpi@
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
2008-09-06import of OpenSSL 0.9.8hDamien Miller
2014-06-10Check return value of EVP_MD_CTX_copy_ex() in ssl3_handshake_mac()Loganaden Velvindron
to avoid potential null pointer dereference. Based on david ramos work. OK from miod@ and jsing@
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-10Remove pointless casts and use c instead of &c[0], since it is the sameJoel Sing
thing for an unsigned char array. ok deraadt@
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-10More KNF.Joel Sing
2014-06-10Avoid potential NULL pointer function calls in n_ssl3_mac() by checkingJoel Sing
the return value of EVP_MD_CTX_copy_ex(). If the copy fails early then EVP_DigestUpdate() will invoke md_ctx.update(), which will be a NULL function pointer. Analysis and patch from David Ramos. ok deraadt@
2014-06-10Multiple fixes for ssl3_digest_cached_records() - if EVP_MD_CTX_create()Joel Sing
fails, the NULL check will add an error but it does not abort. This will result in EVP_DigestInit_ex() being called with a NULL context. Also ensure that we check the return values from EVP_DigestInit_ex() and EVP_DigestUpdate(). ok deraadt@ miod@