summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-09-13Make sure that the following functions return 0 and EINVAL asschwarze6-20/+60
required by the C standard when called with an invalid base: strtoll(), strtoimax(), strtoul(), strtoull(), and strtoumax(). Same behaviour for strtoq() and strtouq() even though not standardized. No functional change in strtol(), it was the only one already correct. While here, simplify the conditional expression for checking the base and sync whitespace and comments among the six files. ok millert@
2014-09-10Disable -Wshadow again, since it breaks builds on vax with gcc3.jsing1-2/+2
2014-09-08obvious cases of missing .An;schwarze1-3/+3
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2014-09-07Remove SSL_kDHr, SSL_kDHd and SSL_aDH. No supported ciphersuites use them,jsing16-182/+54
nor do we plan on supporting them. ok guenther@
2014-09-04POSIX specifies arpa/inet.h as the include file for these.millert1-3/+3
OK aja@ mikeb@
2014-09-01Enable -Wshadow in openssl(1) and fix a few shadow warnings.doug5-25/+21
ok jsing@
2014-09-01Convert ecparam to new option/usage handling.jsing1-197/+215
2014-09-01Improve option usage output.jsing1-7/+20
If the option/argument string exceeds the given width, add a hanging indent prior to displaying the description. Also, if the description includes newlines, wrap and indent for each newline so that the indentation is correctly maintained.
2014-08-31Make the in6addr constant declarations and definitions consistentbluhm1-3/+3
in kernel and user land. OK florian@ mpi@
2014-08-31Add sockatmark()guenther3-5/+170
ok millert@ manpage feedback jmc@
2014-08-30Convert openssl(1) version to new option/usage handling.jsing1-34/+90
2014-08-30Move the callback function pointer outside the opt union so that the optionjsing2-4/+10
values are useable by the function. Also provide an option type that calls a function without consuming/passing an argument.
2014-08-28OpenSSL_add_all_algorithms() is called from openssl_startup() - it does notjsing6-13/+6
need to also be called from some of the applications.
2014-08-28openssl_setup() calls SSL_load_error_strings(), which happens to calljsing27-60/+30
ERR_load_crypto_strings() - as such, we do not need to call the same function from most of the applications.
2014-08-28Add option handling with a callback function for argument processing.jsing2-2/+10
2014-08-28Convert openssl(1) crl to new option/usage handling.jsing1-186/+246
2014-08-28Given the usage option name/argument name width a few more characters.jsing1-2/+2
2014-08-28Ensure that a format option argument is a known specifier.jsing1-2/+10
2014-08-28Add option handling for ordered flags.jsing2-2/+8
2014-08-28Add option handling for input/output formats.jsing2-2/+8
2014-08-28preserve errno value on success.bcook2-8/+12
If getrandom returns a temporary failure, make sure errno is not polluted when it succeeds. Thanks to deraadt@ for pointing it out.
2014-08-27Convert openssl(1) prime to the new options/usage handling.jsing1-60/+81
2014-08-27Reset the config struct before calling options_parse(), otherwise configjsing1-1/+3
options from the previous run stick in interactive mode.
2014-08-27Add an option type that handles argument to integer conversion.jsing2-4/+22
2014-08-27Implement table-driven option parsing that allows an application tojsing3-76/+192
specify what its valid options are and where it wants them to be stored. This also allows for usage to be generated, almost for free, ensuring that the options and usage are automatically kept in sync. This will allow for a single option parsing implementation, rather than the current one-hand-rolled-option-parsing-and-random-usage-implementation per application. As a starting point, port the openssl(1) rand application to the new option parsing and usage (along with associated code clean up). With input from doug@. ok bcook@ doug@
2014-08-27Add the API function ressl_config_set_ecdhcurve(config, name) to set areyk4-9/+29
non-standard ECDH curve by name or to disable it by passing NULL. OK jsing@
2014-08-26remove nginx referencesrobert1-2/+1
2014-08-26Update regress to follow openssl(1) move.jsing9-2/+244
2014-08-26Move openssl(1) from /usr/sbin/openssl to /usr/bin/openssl, since it is notjsing58-88/+84
a system/superuser binary. At the same time, move the source code from its current lib/libssl/src/apps location to a more appropriate home under usr.bin/openssl. ok deraadt@ miod@
2014-08-24constify strerror return valuebcook2-4/+4
There is no intention to modify the string returned by strerror and doing so is forbidden by the standard. from Jonas 'Sortie' Termansen ok tedu@ deraadt@
2014-08-24Include <sys/time.h> to get struct timevalbcook2-2/+4
The crypto/bio/bss_dgram.c file assumes that another file indirectly includes <stdlib.h> that includes <sys/time.h>. from Jonas 'Sortie' Termansen ok deraadt@ tedu@
2014-08-24Include <sys/select.h> to get selectbcook4-4/+9
These files currently depends on the wrapper <stdlib.h> file indirectly including a header that provides select(). from Jonas 'Sortie' Termansen ok deraadt@ tedu@
2014-08-24Let SSL_CIPHER_description() allocate the buffer for the description,jsing1-4/+6
rather than passing in a fixed size buffer. This is yet another example of a horribly designed API - if the given buffer is NULL then SSL_CIPHER_description() allocates one for us (great!), which we then need to free (no problem). However, if this allocation fails it returns a pointer to a static string "OPENSSL_malloc Error" - obviously bad things happen if we call free() with this pointer. Unfortunately, there is no way of knowing that the function failed, other than comparing the returned string against the string literal - so do that before calling free()... Joint work with beck@ during g2k14.
2014-08-24Replace the remaining uses of ssl3_put_cipher_by_char() with s2n and ajsing10-58/+38
ssl3_cipher_get_value() helper function, which returns the cipher suite value for the given cipher. ok miod@
2014-08-23Remove non-standard GOST cipher suites (which are not compiled injsing2-136/+2
currently). From Dmitry Eremin-Solenikov.
2014-08-23Replace the remaining ssl3_get_cipher_by_char() calls with n2s() andjsing8-80/+60
ssl3_get_cipher_by_id(). ok bcook@
2014-08-23unbind;jmc5-27/+16
2014-08-19Three independent typos for `independent' or `independently'.miod2-2/+2
2014-08-18replace more ROTATE macros with plain-old C code.bcook4-80/+38
Let the compiler optimize these. Even older versions of gcc generate equal or better quality code than the inline asm. ok miod@
2014-08-18remove return value from HOST_c2l/l2c macrosbcook16-212/+212
These macros and asm inlines simulate a function returning a value, but nothing ever uses this return value. Remove the pseudo-returns and (void) casts discarding the unused values. This, maybe unsurprisingly, speeds things up a bit. It also removes the GCC 4.9 warnings about unused values. ok miod@ deraadt@
2014-08-18a small tweak to improve malloc in multithreaded programs. we don't needtedu1-7/+21
to hold the malloc lock across mmap syscalls in all cases. dropping it allows another thread to access the existing chunk cache if necessary. could be improved to be a bit more aggressive, but i've been testing this simple diff for some time now with good results.
2014-08-16replace sprintf/strdup with asprintf in engine testbcook1-8/+5
2014-08-16only build the getrandom path if SYS_getrandom is defined.bcook2-6/+14
like the sysctl path
2014-08-16use C rather than C++ array initialization syntaxbcook1-37/+37
this causes errors with stricter C compilers
2014-08-16getrandom(2) support for getentropy_linuxbcook2-26/+20
This enables support for the new getrandom(2) syscall in Linux 3.17. If the call exists and fails, return a failure in getentropy(2) emulation as well. This adds a EINTR check in case the urandom pool is not initialized. Tested on Fedora Rawhide with 3.17rc0 and Ubuntu 14.04 ok deraadt@
2014-08-15use void * instead of char *. ok jsingtedu2-6/+6
2014-08-15XPG requires insque() and remque() to work with linear lists and not justguenther3-21/+26
circular lists. Amazingly, they managed to extend the requirements to no longer match the behavior of the VAX instructions they were modeled after, so the trivial VAX ASM versions have to go. Nice job breaking it, X/Open! Based on a diff from enh (at) google.com ok miod@
2014-08-14fixed overrid(d)en typotobias3-5/+5
millert@ and jmc@ agree that "overriden" is wrong
2014-08-13munmap correct object in (extremely unlikely, and effectively terminal)deraadt6-12/+12
case of failing to map the 2nd object. found by Paul Maurers
2014-08-12Merge a patch that i successfully pushed to OpenSSL,schwarze2-2/+2
original OpenSSL commit message follows: Fixed as shown; to be released post-1.0.2 commit bebbb11d132cc149f7713d6693703f8bfae10072 Author: Ingo Schwarze <schwarze@usta.de> Date: Sat Jan 18 11:46:25 2014 +0100 RT3239: Extra comma in NAME lines of two manpages In two OpenSSL manual pages, in the NAME section, the last word of the name list is followed by a stray trailing comma. While this may seem minor, it is worth fixing because it may confuse some makewhatis(8) implementations. While here, also add the missing word "size" to the one line description in SSL_CTX_set_max_cert_list(3). Reviewed by: Dr Stephen Henson <shenson@drh-consultancy.co.uk>