History log of /openbsd-src/lib/libcrypto/bio/b_sock.c (Results 26 – 50 of 71)
Revision Date Author Comments
# af3dd0e3 08-Jul-2014 jsing <jsing@openbsd.org>

More KNF.


# e9bd8d7b 08-Jul-2014 jsing <jsing@openbsd.org>

Avoid locking in BIO_get_port() by using getservbyname_r() instead of
getservbyname(). While here, provide a common/single return path.

ok deraadt@


# f6a4cb39 08-Jul-2014 jsing <jsing@openbsd.org>

Simplify various BIO_sock_* fuctions - less code, better variable names,
correct types and fewer casts.

ok deraadt@ miod@


# 4463abb8 24-Jun-2014 jsing <jsing@openbsd.org>

Replace 48 lines of code with a single inet_pton() call. The previous
handrolled version could not even make use of sscanf(), since that would
not work with a certain antiquated compiler.

It is wort

Replace 48 lines of code with a single inet_pton() call. The previous
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@

show more ...


# 37aae7a4 24-Jun-2014 jsing <jsing@openbsd.org>

Actually make BIO_set_tcp_ndelay() work - TCP_NODELAY will not magically
appear by itself.

ok beck@ miod@


# c7046ecc 22-Jun-2014 jsing <jsing@openbsd.org>

BIO_sock_init() no longer does anything, so stop calling it.


# b8054511 22-Jun-2014 jsing <jsing@openbsd.org>

Just use SOMAXCONN and IPPROTO_TCP, since we know we have them.


# e5e87f23 22-Jun-2014 jsing <jsing@openbsd.org>

In BIO_get_port(), use strol() with appropriate range checks rather than
an atoi() followed by an unsigned short cast. This stops things like "-1"
and "66536" from being considered to be "valid" port

In BIO_get_port(), use strol() with appropriate range checks rather than
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@

show more ...


# c3d6a26a 12-Jun-2014 deraadt <deraadt@openbsd.org>

tags as requested by miod and tedu


# 218a6791 08-Jun-2014 deraadt <deraadt@openbsd.org>

Stop using DSO_global_lookup to reach getaddrinfo() and friends
discussed with tedu, ok jsing


# 0b1e3033 30-May-2014 deraadt <deraadt@openbsd.org>

more: no need for null check before free
ok tedu guenther


# f7683bc0 05-May-2014 jsing <jsing@openbsd.org>

Sort and group includes.


# eca31f83 05-May-2014 jsing <jsing@openbsd.org>

Repair BIO_socket_nbio operation.

ok miod@


# 0f637b92 26-Apr-2014 beck <beck@openbsd.org>

Replace all use of ERR_add_error_data with ERR_asprintf_error_data.
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

Replace all use of ERR_add_error_data with ERR_asprintf_error_data.
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@

show more ...


# de05ecf1 23-Apr-2014 miod <miod@openbsd.org>

The usual idiom to cope with systems not defining socklen_t is to add a
#define socklen_t int
somewhere (or a typedef, whatever gives you an integer type of the size
your system expects as the 3rd ar

The usual idiom to cope with systems not defining socklen_t is to add a
#define socklen_t int
somewhere (or a typedef, whatever gives you an integer type of the size
your system expects as the 3rd argument of accept(2), really).

OpenSSL here is a bit more creative by using an union of an int and a size_t,
and extra code if sizeof(int) != sizeof(size_t) in order to recover the
proper size. With a comment mentioning that this has no chance to work on
a platform with a stack growing up and accept() returning an int, fortunately
this seems to work on HP-UX.

Switch to the light side of the force and declare and use socklen_t variables,
period. If your system does not define socklen_t, consider bringing it back
to your vendor for a refund.

ok matthew@ tedu@

show more ...


# 282e04bd 23-Apr-2014 tedu <tedu@openbsd.org>

close socket in failure cases too


# 3b95b750 23-Apr-2014 tedu <tedu@openbsd.org>

if realloc failed, BIO_accept would leak memory and return NULL, causing
caller to crash. Fix leak and return an error instead. from Chad Loder


# 5359f6d5 19-Apr-2014 guenther <guenther@openbsd.org>

We'll interpret a (void) cast on snprintf() to mean it's been verified that
truncation is either desirable, not an issue, or is detected and handled later

ok deraadt@


# 1f76dd3e 18-Apr-2014 tedu <tedu@openbsd.org>

unifdef NO_SOCK


# 40fdcb44 18-Apr-2014 deraadt <deraadt@openbsd.org>

Put the final pieces from e_os.h in the required places, and remove it.
"dance on it's grave" says beck
ok guenther beck


# 0b65c6b9 18-Apr-2014 deraadt <deraadt@openbsd.org>

unistd.h for protos where needed


# 5c1e108d 17-Apr-2014 tedu <tedu@openbsd.org>

more windows/netware leftovers


# 69f1b125 17-Apr-2014 tedu <tedu@openbsd.org>

delete if 0 code


# edd82e4a 17-Apr-2014 deraadt <deraadt@openbsd.org>

Mostly gut e_os.h:
USE_SOCKETS is unrelated to using sockets, but just pulls in .h files. It
makes every file buy a kitchen sink, because 11 files forgot to.
EXIT() is really exit(), a gentle surpri

Mostly gut e_os.h:
USE_SOCKETS is unrelated to using sockets, but just pulls in .h files. It
makes every file buy a kitchen sink, because 11 files forgot to.
EXIT() is really exit(), a gentle surprise
but... OPENSSL_EXIT() is really just return(), because noone compiles the
openssl command non-monolithic anymore

show more ...


# 6f3a6cb1 17-Apr-2014 beck <beck@openbsd.org>

Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free


123