Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Use arc4random_buf() instead of RAND_bytes() or RAND_pseudo_bytes(). | jsing | 2014-10-22 | 1 | -4/+4 | |
| | | | | | | | | arc4random_buf() is guaranteed to always succeed - it is worth noting that a number of the replaced function calls were already missing return value checks. ok deraadt@ | |||||
* | The return value on success of fcntl(F_SETFL) is not actually specified, | bcook | 2014-10-13 | 1 | -3/+3 | |
| | | | | | | only that it returns -1 on failure. pointed out by guenther@ | |||||
* | Use O_NONBLOCK over FIONBIO. | bcook | 2014-10-13 | 1 | -2/+8 | |
| | | | | | | | | | 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@ | |||||
* | Include <sys/time.h> to get struct timeval | bcook | 2014-08-24 | 1 | -1/+2 | |
| | | | | | | | | | 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@ | |||||
* | BIO_free() returns immediately when the sole input is NULL. | doug | 2014-07-25 | 2 | -8/+5 | |
| | | | | | | Remove unnecessary NULL check. ok miod@ | |||||
* | Mark the format string argument to BIO_*printf as not being allowed to be NULL | guenther | 2014-07-20 | 1 | -5/+7 | |
| | | | | ok bcook@ | |||||
* | do not need a variable to track locking, since all code paths have it | deraadt | 2014-07-16 | 1 | -5/+2 | |
| | | | | locked throughout. | |||||
* | The bell tolls for BUF_strdup - Start the migration to using | beck | 2014-07-13 | 3 | -8/+8 | |
| | | | | | | intrinsics. This is the easy ones, a few left to check one at a time. ok miod@ deraadt@ | |||||
* | unbreak build this needed to be an and.. | beck | 2014-07-13 | 1 | -2/+2 | |
| | | | | ok jsing@ | |||||
* | Take out __bounded__ in the include files we use it in when not on OpenBSD. | beck | 2014-07-13 | 1 | -2/+4 | |
| | | | | | | | while we can take it out in portable at compile time, it is still a problem when we install this header file on a system that doesn't support __bounded__ if this is unguarded. ok miod@ bcook@ | |||||
* | Fix a memory leak in BIO_free() which no current BIO can trigger; OpenSSL | miod | 2014-07-11 | 1 | -4/+3 | |
| | | | | PR #3439 via OpenSSL trunk | |||||
* | Missing calloc() return value check in dgram_sctp_ctrl(); from Kurt Roeckx via | miod | 2014-07-11 | 1 | -11/+21 | |
| | | | | OpenSSL trunk | |||||
* | Only import cryptlib.h in the four source files that actually need it. | jsing | 2014-07-11 | 17 | -47/+40 | |
| | | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@ | |||||
* | Explicitly include <openssl/opensslconf.h> in every file that references | jsing | 2014-07-10 | 3 | -3/+10 | |
| | | | | | | | | | an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers. | |||||
* | Simplify realloc() usage; ok tedu@ | miod | 2014-07-10 | 1 | -15/+6 | |
| | ||||||
* | Stop including standard headers via cryptlib.h - pull in the headers that | jsing | 2014-07-10 | 12 | -39/+57 | |
| | | | | | | are needed in the source files that actually require them. ok beck@ miod@ | |||||
* | delete some casts. ok miod | tedu | 2014-07-10 | 1 | -2/+2 | |
| | ||||||
* | replace getservbyname_r with getaddrinfo for portability | bcook | 2014-07-10 | 1 | -6/+11 | |
| | | | | ok jsing@ | |||||
* | include <limits.h> for LONG_MIN/LONG_MAX. | bcook | 2014-07-09 | 1 | -2/+2 | |
| | | | | | | | Also remove <sys/filio.h> added from previous commit. This was the wrong way to get FIONBIO. ok jsing@ | |||||
* | add <sys/filio.h> header for FIONBIO | bcook | 2014-07-09 | 1 | -1/+2 | |
| | | | | ok beck@ | |||||
* | Pretty much everything has SO_REUSEADDR - nuke the #ifdefs. | jsing | 2014-07-08 | 1 | -5/+1 | |
| | | | | ok beck@ | |||||
* | We have EAI_FAMILY - remove the #ifdefs. | jsing | 2014-07-08 | 1 | -5/+1 | |
| | | | | ok beck@ | |||||
* | More KNF. | jsing | 2014-07-08 | 1 | -11/+21 | |
| | ||||||
* | Avoid locking in BIO_get_port() by using getservbyname_r() instead of | jsing | 2014-07-08 | 1 | -31/+31 | |
| | | | | | | getservbyname(). While here, provide a common/single return path. ok deraadt@ | |||||
* | Simplify various BIO_sock_* fuctions - less code, better variable names, | jsing | 2014-07-08 | 1 | -27/+12 | |
| | | | | | | correct types and fewer casts. ok deraadt@ miod@ | |||||
* | Replace 48 lines of code with a single inet_pton() call. The previous | jsing | 2014-06-24 | 1 | -48/+3 | |
| | | | | | | | | | | | | | handrolled version could not even make use of sscanf(), since that would not work with a certain antiquated compiler. It is worth noting that there is a tiny change in behaviour - previously calling BIO_get_host_ip() with something that looked like it might be a valid IP address (for example, "1." or even ".") would result in it returning failure rather than trying a BIO_gethostbyname() - now we'll always try a BIO_gethostbyname() if it was not a valid IPv4 address. ok beck@ miod@ deraadt@ | |||||
* | Actually make BIO_set_tcp_ndelay() work - TCP_NODELAY will not magically | jsing | 2014-06-24 | 1 | -16/+3 | |
| | | | | | | appear by itself. ok beck@ miod@ | |||||
* | BIO_sock_init() no longer does anything, so stop calling it. | jsing | 2014-06-22 | 1 | -10/+1 | |
| | ||||||
* | Just use SOMAXCONN and IPPROTO_TCP, since we know we have them. | jsing | 2014-06-22 | 1 | -14/+4 | |
| | ||||||
* | In BIO_get_port(), use strol() with appropriate range checks rather than | jsing | 2014-06-22 | 3 | -34/+50 | |
| | | | | | | | an atoi() followed by an unsigned short cast. This stops things like "-1" and "66536" from being considered to be "valid" port numbers. ok beck@ deraadt@ | |||||
* | tags as requested by miod and tedu | deraadt | 2014-06-12 | 21 | -21/+22 | |
| | ||||||
* | Tsk. Tsk. Someone forgot to compile test the other half. | jsing | 2014-06-11 | 1 | -2/+2 | |
| | ||||||
* | Provide support for non-funopen systems. | deraadt | 2014-06-11 | 1 | -8/+30 | |
| | | | | ok beck | |||||
* | c-file-style hints, begone; ok beck | deraadt | 2014-06-11 | 1 | -1/+1 | |
| | ||||||
* | Stop using DSO_global_lookup to reach getaddrinfo() and friends | deraadt | 2014-06-08 | 1 | -40/+3 | |
| | | | | discussed with tedu, ok jsing | |||||
* | Fix memory leak. | logan | 2014-06-03 | 1 | -0/+1 | |
| | | | | | | (From Martin Brejcha) OK from tedu@, miod@ and deraadt@ | |||||
* | Remove __bio_h__attr__ wrapper around __attribute__, since earlier statements | miod | 2014-06-01 | 1 | -10/+4 | |
| | | | | | | in this file directly use __attribute__. ok deraadt@ | |||||
* | Fix some more nasty stringyness in here by using asprintf instead of cruft. | beck | 2014-05-30 | 1 | -10/+7 | |
| | | | | gets rid of the second last use of the awful DECIMAL_SIZE. | |||||
* | more: no need for null check before free | deraadt | 2014-05-30 | 8 | -41/+19 | |
| | | | | ok tedu guenther | |||||
* | remove CONST_STRICT. ok beck deraadt | tedu | 2014-05-30 | 1 | -7/+0 | |
| | ||||||
* | Everything sane has stdio, and FILE *. we don't need ifdefs for this. | beck | 2014-05-29 | 2 | -8/+0 | |
| | | | | ok to firebomb from tedu@ | |||||
* | Any sane platform has stdio. Stop pretending we will ever use a platform | beck | 2014-05-29 | 2 | -4/+0 | |
| | | | | | that does not. "fire bomb" tedu@ | |||||
* | Almost nothing actually needs to include <openssl/e_os2.h>, however by | jsing | 2014-05-24 | 1 | -1/+1 | |
| | | | | | | | including it they get <openssl/opensslconf.h>. So instead of pulling in <openssl/e_os2.h>, just pull in <openssl/opensslconf.h>. "go ahead" miod@ | |||||
* | Spell ssize_t correctly (the incorrect spelling is ossl_ssize_t). | jsing | 2014-05-24 | 1 | -9/+9 | |
| | | | | ok miod@ | |||||
* | mark BIO_snprintf as deprecated, so warnings will be generated for it's | beck | 2014-05-22 | 1 | -2/+2 | |
| | | | | use. ok miod@ tedu@ | |||||
* | Sort and group includes. | jsing | 2014-05-05 | 2 | -10/+11 | |
| | ||||||
* | Repair BIO_socket_nbio operation. | jsing | 2014-05-05 | 1 | -2/+3 | |
| | | | | ok miod@ | |||||
* | Use C99 initializers for the various FOO_METHOD structs. More readable, and | miod | 2014-04-27 | 14 | -148/+132 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid unreadable/unmaintainable constructs like that: const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { EVP_PKEY_CMAC, EVP_PKEY_CMAC, 0, "CMAC", "OpenSSL CMAC method", 0,0,0,0, 0,0,0, cmac_size, 0, 0,0,0,0,0,0,0, cmac_key_free, 0, 0,0 }; ok matthew@ deraadt@ | |||||
* | Replace all use of ERR_add_error_data with ERR_asprintf_error_data. | beck | 2014-04-26 | 3 | -20/+19 | |
| | | | | | | | | This avoids a lot of ugly gymnastics to do snprintfs before sending the bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c where it was being called with the incorrect number of arguments and using random things off the stack as addresses of strings. ok krw@, jsing@ | |||||
* | This is not FreeBSD. | jsing | 2014-04-26 | 1 | -18/+0 | |
| | | | | ok miod@ |