summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* BIO_free() and SSL_CTX_free() have explicit NULL checks, so there is nojsing2014-10-131-29/+16
| | | | need to have additional checks here.
* Add NPN regress tests from OpenSSL. However, unlike OpenSSL, actually exitjsing2014-10-132-3/+146
| | | | with a failure if the NPN verification fails.
* The return value on success of fcntl(F_SETFL) is not actually specified,bcook2014-10-132-6/+6
| | | | | | only that it returns -1 on failure. pointed out by guenther@
* prefer C99 array initialization syntax.bcook2014-10-135-10/+10
| | | | | | | | use C99 array initialization syntax for strict C compilers. from kinichiro, found building with HP/UX compiler ok deraadt@, guenther@
* Use O_NONBLOCK over FIONBIO.bcook2014-10-134-15/+23
| | | | | | | | | Prefer this because it is the POSIX standard and has consistent behavior across platforms. Use BIO_socket_nbio consistently across the tree. from Jonas 'Sortie' Termansen, ok deraadt@
* Remove useless comments in DES_is_weak_key(). Do we really care that thismiod2014-10-122-28/+20
| | | | function was found broken in 1993, and later on in 1997?
* Paranoia: in ASN1_mbstring_ncopy(), check for len < 0 instead of len == -1,miod2014-10-122-4/+4
| | | | in order to catch all negative sizes.
* Convert libssl manpages from pod to mdoc(7).bentley2014-10-12249-7737/+19938
| | | | | | libcrypto has not been started yet. ok schwarze@ miod@
* include header needed by older linux kernelsbcook2014-10-112-2/+4
| | | | not all versions of <linux/random.h> include <linux/types.h> by default
* Since deraadt@ remembers seeing strdup() on one particular 4.2BSD machine,schwarze2014-10-111-4/+11
| | | | | | | | | | | i looked a bit closer and found instances before Reno, so correct HISTORY. References: http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/src/ucb/dbx/defs.h http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD/usr/src/etc/inetd.c http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Reno/src/lib/libc/string/strdup.c ok deraadt@
* Userland reallocarray() audit.doug2014-10-111-3/+3
| | | | | | | Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@
* Userland reallocarray() audit.doug2014-10-111-3/+3
| | | | | | | Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@
* replace select with equiv poll usage.dlg2014-10-101-17/+12
| | | | | looks good deraadt@ tweaks and ok millert@
* add an API version number. ok jsingtedu2014-10-091-1/+3
|
* historytedu2014-10-081-4/+10
|
* use preferred license form. can't trust that doug guy with anything...tedu2014-10-081-20/+11
|
* mlinks, and prune some functions from man page i'm not ready for yet.tedu2014-10-082-14/+33
|
* more bettertedu2014-10-081-3/+6
|
* reluctantly rename man page after a functiontedu2014-10-081-1/+1
|
* whack a few stray .Pp macrosschwarze2014-10-081-4/+1
|
* add a few more functions.tedu2014-10-081-5/+17
| | | | | (I also forgot to credit doug for much of the initial markup in the previous commit.)
* rough sketch of ressl documentationtedu2014-10-081-0/+318
|
* using reallocarray() gives us multiplicative integer overflow checkingderaadt2014-10-081-3/+3
| | | | | | | | | | in case something wants to create massive amounts of environment, like a bit more than 1/4 of a 32-bit address space. unrealistic -- but why audit one code path, and not treat others the same? then you have to re-engage everytime you see the code. read the news, that isn't what developers do. At least if the code paths look the same, there is hope, because they are easier to verify for correctness. developers need to give other developers a chance to want to care.
* obvious malloc -> reallocarray, for mult int oflowderaadt2014-10-081-2/+2
|
* fix an indentation that makes me upsetderaadt2014-10-081-2/+2
|
* Use strdup() instead of malloc() + memcpy().miod2014-10-072-16/+6
| | | | ok doug@ jsing@
* EC_KEY_set_group() does an EC_GROUP_dup() of its argument, so we don'tmiod2014-10-072-16/+4
| | | | | need to do it in ec_copy_parameters() prior to invoking EC_KEY_set_group(). ok doug@ jsing@
* When verifying whether an IP address is in the commonName of ajca2014-10-061-1/+15
| | | | | | certificate, do not perform wildcard matching. Suggested by Richard Moore (rich@kde) ok tedu@
* If we have to match against a wildcard in a cert, verify that it containsjca2014-10-061-3/+23
| | | | | | at least a domain label before the tld, as in *.example.org. Suggested by Richard Moore (rich@kde) ok tedu@
* The fixes to X509_PURPOSE_add() in r1.18 actually could cause a globalmiod2014-10-052-54/+58
| | | | | | | | | | | | | X509_PURPOSE object (obtained with X509_PURPOSE_get0() instead of being allocated in the function) to be freed if modifying that object would fail due to a low memory condition, while this object would still be referenced elsewhere. Fix this by only cleaning the object if we did not allocate it here. While there, fail early if either `name' or `sname' are NULL, rather than allocating an object and realizing we have nothing to strdup() into it. ok guenther@
* Be sure to check the stack push operation for success in v2i_POLICY_MAPPINGS();miod2014-10-052-34/+38
| | | | | | if it fails, free the object we were about to push. Factor error handling to avoid having four copies of about the same code. ok guenther@
* In v2i_AUTHORITY_INFO_ACCESS(), separate object allocation from object pushmiod2014-10-052-6/+16
| | | | | | on a stack; if the latter fails, we need to free the object before returning failure. ok guenther@
* Memory leak upon error in set_dist_point_name().miod2014-10-052-2/+4
| | | | ok guenther@
* Be sure to check object allocation for success before using them.miod2014-10-052-10/+20
| | | | Tweaks and ok guenther@
* Missing deallocation upon error.miod2014-10-052-4/+6
| | | | ok deraadt@ guenther@
* Fix memory leak in the error path of v2i_AUTHORITY_KEYID().miod2014-10-052-6/+12
| | | | ok deraadt@ guenther@
* compile with c89 (code / decl ordering); from Joakim.Tjernlund@transmode.sederaadt2014-10-052-4/+6
| | | | ok miod
* Use more specific curves/formats naming for local variables injsing2014-10-052-60/+56
| | | | | | | ssl_add_clienthello_tlsext() and ssl_add_serverhello_tlsext(), rather than the current generic naming. ok miod@
* Use tls1_get_curvelist() in ssl_add_clienthello_tlsext(), rather thanjsing2014-10-052-22/+4
| | | | | | hand rolling the same code. ok miod@
* Make tls1_get_formatlist() behave the same as tls1_get_curvelist() andjsing2014-10-052-42/+58
| | | | | | | | return the client format list if the client_formats flag is specified. Use tls1_get_formatlist()/tls1_get_curvelist() in tls1_check_ec_key(), simplifying the code. ok miod@
* verify changes are major changetedu2014-10-031-2/+2
|
* Bump minor for ECHD auto and other recent changes.jsing2014-10-031-1/+1
|
* Bump minor version for ECDH auto.jsing2014-10-032-2/+2
| | | | | While there are no additional symbols, there is an additional command that clients will potentially depend on.
* allow disabling hostname and cert verification separately.tedu2014-10-034-11/+22
| | | | | | if you're careful, cert only verification can be useful. always enable both though, to avoid accidentally leaving one off. ok jsing
* Allow "auto" to be specified as an ECDH curve name and make this thejsing2014-10-032-7/+13
| | | | | | default. This enables automatic handling of ephemeral EC keys. Discussed with reyk@ and tedu@
* Add support for automatic ephemeral EC keys.jsing2014-10-0314-26/+152
| | | | | | | | | | This allows an SSL server to enable ECDHE ciphers with a single setting, which results in an EC key being generated using the first preference shared curve. Based on OpenSSL with inspiration from boringssl. ok miod@
* Use string literals in printf style calls so gcc's -Wformat works.doug2014-10-038-40/+38
| | | | ok tedu@, miod@
* openssl.cnf tweaks following recent changes to usr.bin/openssl:sthen2014-10-011-44/+3
| | | | | | | | | | | | | | - don't define default_bits, allowing the compiled-in default (now 2048 bits) to take priority. - add commented-out default_md line in case somebody needs an easy way to change this. - remove some sample sections which aren't really useful in the default file (/etc/examples is the place for a more descriptive config, this file should be barebones). Help/OK jsing@. OKs on earlier diff (openssl.cnf only) from phessler@ aja@.
* Switch "openssl req" to using SHA256 for hashes and AES256 to encrypt on-disksthen2014-10-012-12/+12
| | | | | | | | | | keys by default (instead of SHA1/3DES) and update documentation to match. Another way to do this is s/NID_sha1/NID_sha256/ in src/crypto/rsa/rsa_ameth.c ("case ASN1_PKEY_CTRL_DEFAULT_MD_NID") but going with the more targetted method above that only affects "openssl req" for now. Help/OK jsing@. OKs on earlier diffs changing openssl.cnf from phessler@ aja@
* Clean up EC cipher handling in ssl3_choose_cipher().jsing2014-09-306-290/+304
| | | | | | | | | | | The existing code reaches around into various internals of EC, which it should not know anything about. Replace this with a set of functions that that can correctly extract the necessary details and handle the comparisions. Based on a commit to OpenSSL, with some inspiration from boringssl. ok miod@