summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-05-24Maximilian dot Fillinger at uni-duesseldorf dot deschwarze3-74/+109
starts helping with the pod2mdoc(1)-based conversion of LibreSSL crypto manuals from perlpod(1) to mdoc(7). Here comes the first file, slightly tweaked by me.
2015-05-23bump to version 2.2bcook2-4/+4
ok deraadt@
2015-05-20No need to check the return value of memcpy() if you actually checked thismiod2-6/+4
pointer for NULL the line above; ok doug@
2015-05-17Record inter-library dependencies between libcrypto, libssl and libtlskettenis6-2/+11
2015-05-15Make index/rindex weak aliases of strchr/strrchr since they are notmillert4-90/+6
part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
2015-05-15Fix return paths with missing EVP_CIPHER_CTX_cleanup() calls.jsg10-30/+32
ok doug@
2015-05-14rev 1.3 introduced a check to an if statement without adding braces.jsg1-3/+1
Claudio points out the size is checked by an earlier test so just remove it to restore the original handling of the partial octet case. Discussed with claudio and gilles.
2015-05-13If crypt(3) is called with an unknown setting, return NULL insteadbluhm1-1/+3
of some undefined value. OK tedu@
2015-05-12Add dlclose(3) to SEE ALSOguenther1-2/+3
ok millert@ jmc@ schwarze@
2015-05-11When checking flags that will be passed to open(), test the O_ACCMODE portionguenther1-2/+3
separately to avoid false negatives. ok miod@ millert@
2015-05-08Make this run on strict alignment architectures.miod1-6/+9
2015-05-04Add SwissSign CA root certificates. Requested by robert@, ok dcoppa@ aja@ miod@sthen1-0/+381
2015-04-30use strdup() to init stringderaadt2-6/+4
ok doug millert
2015-04-29Add whitespace and replace OPENSSL_free with free in documentation.doug6-22/+22
ok jsing@
2015-04-29Call CBB_add_space() rather than reimplementing it.doug2-4/+4
ok jsing@
2015-04-29Rename cbb_buffer_add_u to cbb_add_u and remove redundant code.doug2-30/+12
All of cbb_buffer_add_u's callers first call CBB_flush and send cbb->base. cbb_add_u() now has that common code in one place. ok jsing@
2015-04-29Added len_len error checking for internal cbb_buffer_add_u().doug2-2/+8
ok jsing@
2015-04-29Call CBS_mem_equal() rather than reimplementing it.doug2-6/+4
ok jsing@
2015-04-29Avoid NULL deref in CBS_get_any_asn1_element().doug2-4/+6
This function is documented as allowing NULL for out_header_len. ok jsing@
2015-04-29Added error checking for len argument in cbs_get_u().doug2-2/+8
tweak + ok jsing@
2015-04-29free() can handle NULL.doug2-16/+8
ok jsing@
2015-04-29Reject dNSName of " " for subjectAltName extension.doug1-1/+20
RFC 5280 says " " must not be used as a dNSName. ok jsing@ jca@
2015-04-29Add missing BN_CTX_end() calls.doug8-36/+36
After calling BN_CTX_start(), there must be a BN_CTX_end() before returning. There were missing BN_CTX_end() calls in error paths. One diff chunk was simply removing redundant code related to this. ok deraadt@
2015-04-27Not all Linux libc's include linux/sysctl.h in sys/sysctl.h.bcook2-4/+6
Include it if we have the sysctl syscall.
2015-04-27Support AIX versions without WPAR support.bcook2-2/+10
From Michael Felt.
2015-04-25Don't ignore the reference count in X509_STORE_free.doug2-2/+10
Based on this upstream commit: bff9ce4db38b297c72a6d84617d71ae2934450f7 which didn't make it into a release until 1.0.2. Thanks to william at 25thandclement dot com for reporting this! ok deraadt@ jsing@ beck@
2015-04-25Check for invalid leading zeros in CBS_get_asn1_uint64.doug3-8/+20
ASN.1 integers cannot have all zeros or all ones for the first 9 bits. This rule ensures the numbers are encoded with the smallest number of content octets (see ITU-T Rec X.690 section 8.3.2). Based on BoringSSL commit 5933723b7b592e9914f703d630b596e140c93e16 ok deraadt@ jsing@
2015-04-23Do not need to buf[0] = 0 before strlcpy(buf, ...deraadt2-4/+2
2015-04-15Only set the cipher list if one was specified and actually check the returnjsing1-7/+12
value from SSL_CTX_set_cipher_list(). Also remove pointless getenv() handling. ok bcook@ doug@
2015-04-15Clean up the ssl_bytes_to_cipher_list() API - rather than having thejsing6-42/+30
ability to pass or not pass a STACK_OF(SSL_CIPHER) *, which is then either zeroed or if NULL a new one is allocated, always allocate one and return it directly. Inspired by simliar changes in BoringSSL. ok beck@ doug@
2015-04-15Now that tls_close() is more robust, consider a failure to be fatal.jsing1-1/+1
2015-04-15Treat SSL_ERROR_ZERO_RETURN as a success, rather than a failure. Alsojsing1-5/+6
ensure that outlen is set to zero so that tls_read() has read(2) like semantics for EOF. Spotted by doug@
2015-04-15Make tls_close() more robust - do not rely on a close notify being receivedjsing1-13/+17
from the other side and only return TLS_READ_AGAIN/TLS_WRITE_AGAIN if we failed to send a close notify on a non-blocking socket. Otherwise be more forceful and always shutdown/close the socket regardless of other failures. Also do not consider ENOTCONN or ECONNRESET to be a shutdown failure, since there are various situations where this can occur. ok doug@ guenther@
2015-04-14Another couple of commas in the wrong place, ok jmcnicm1-3/+3
2015-04-14Move verify externs into the header file.jsing4-12/+8
2015-04-14Convert openssl(1) s_time to new option handling.jsing1-201/+178
ok doug@
2015-04-14Clean up and improve openssl(1) errstr:jsing1-21/+28
- Use BIO_new_fp() instead of BIO_new()/BIO_set_fp() and handle NULL return value in a more appropriate manner. - Use stroul() instead of sscanf() with appropriate error checking. ok doug@
2015-04-13Convert openssl(1) errstr to new option handling.jsing1-6/+34
ok bcook@ doug@
2015-04-12Remove d2i_X509_PKEY and i2d_X509_PKEY from the SSLeay days.doug4-88/+4
i2d_X509_PKEY is a "needs to implement" and d2i_X509_PKEY is broken. Removed upstream in commit b1f3442857c1fd76e91941141bf671d19e90a79d. ok deraadt@, jsing@
2015-04-11Send OPENSSL_issetugid() straight to hell, no final cigarette.deraadt7-34/+6
The issetugid() API is supposed to make a strong promise where "0 means it is safe to look at the environment". Way back in the past someone on the OpenSSL team responded to the environment access danger by creating a wrapper called OPENSSL_issetugid, and went to use it a number of places. However, by default on systems lacking true issetugid(), OPENSSL_issetugid returns 0. 0 indicating safely. False safety. Which means OPENSSL_issetugid() fails to make any sort of promise about safety, in fact it is just the opposite. Can you believe the OpenSSL team? This nastiness was noticed over the years, however noone could gain traction and get it fixed in OpenSSL. Also see a paragraph about this in http://www.tedunangst.com/flak/post/worst-common-denominator-programming ok jsing
2015-04-11Remove all getenv() calls, especially those wrapped by issetugid().deraadt13-115/+30
getenv()'s wrapped by issetugid() are safe, but issetugid() is correct difficult to impliment on many operating systems. By accident, a grand experiment was run over the last year, where issetugid() returned 1 (the safe value) on a few operating systems. Noone noticed & complained that certain environment variables were not working....... ok doug beck jsing, discussion with others
2015-04-11Put back a goto end that was unintentionally removed.jsing1-1/+2
Spotted by doug@
2015-04-11Convert openssl(1) pkeyparam to new option handling.jsing1-61/+74
2015-04-07Make pthread_atfork() track the DSO that called it like atexit() does,guenther3-2/+81
unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread. verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
2015-04-06bludgeon DES support out of crypt. long live the bcrypt.tedu2-761/+9
2015-04-06improve realloc. when expanding a region, actually use the free page cachetedu1-7/+16
instead of simply zapping it. this can save many syscalls in a program that repeatedly grows and shrinks a buffer, as observed in the wild.
2015-04-06readdir() is thread-safe when DIR handles aren't shared, so delete the lock.guenther2-6/+2
(POSIX is fixing its description: readdir_r() was a botch) Patch from Carlos Mart�n Nieto (cmn (at) dwim.me) no -portable concerns bcook@
2015-04-03comma fix;jmc1-3/+3
2015-04-02Handle the case where multiple calls to SSL_shutdown() are required tojsing2-8/+14
close the connection. Also correctly handle the error on failure. Diff from cookieandscream via github.
2015-04-02Correct man page title.jsing1-2/+2
Diff from Tim van der Molen. ok jmc@