diff options
author | bcook <> | 2014-10-13 02:39:09 +0000 |
---|---|---|
committer | bcook <> | 2014-10-13 02:39:09 +0000 |
commit | 7b944af97196f9b4b28af3b73db474a465f413a6 (patch) | |
tree | 70c469b77c3b1769a4552537e8f7a18cbb3e5ef8 /src/usr.bin/openssl/s_client.c | |
parent | 188e36185aae11a52b07f29de8b1334484bac87e (diff) | |
download | openbsd-7b944af97196f9b4b28af3b73db474a465f413a6.tar.gz openbsd-7b944af97196f9b4b28af3b73db474a465f413a6.tar.bz2 openbsd-7b944af97196f9b4b28af3b73db474a465f413a6.zip |
Use O_NONBLOCK over FIONBIO.
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@
Diffstat (limited to 'src/usr.bin/openssl/s_client.c')
-rw-r--r-- | src/usr.bin/openssl/s_client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr.bin/openssl/s_client.c b/src/usr.bin/openssl/s_client.c index 1ba399a4ae..dba1336f76 100644 --- a/src/usr.bin/openssl/s_client.c +++ b/src/usr.bin/openssl/s_client.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_client.c,v 1.2 2014/09/01 20:54:37 doug Exp $ */ | 1 | /* $OpenBSD: s_client.c,v 1.3 2014/10/13 02:39:09 bcook Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -829,9 +829,9 @@ re_start: | |||
829 | BIO_printf(bio_c_out, "CONNECTED(%08X)\n", s); | 829 | BIO_printf(bio_c_out, "CONNECTED(%08X)\n", s); |
830 | 830 | ||
831 | if (c_nbio) { | 831 | if (c_nbio) { |
832 | unsigned long l = 1; | 832 | if (!c_quiet) |
833 | BIO_printf(bio_c_out, "turning on non blocking io\n"); | 833 | BIO_printf(bio_c_out, "turning on non blocking io\n"); |
834 | if (BIO_socket_ioctl(s, FIONBIO, &l) < 0) { | 834 | if (!BIO_socket_nbio(s, 1)) { |
835 | ERR_print_errors(bio_err); | 835 | ERR_print_errors(bio_err); |
836 | goto end; | 836 | goto end; |
837 | } | 837 | } |