*/
#include <sys/types.h>
+#include <sys/ioctl.h>
+
#include <netinet/in.h>
#include <assert.h>
#include <ctype.h>
extern int verify_error;
extern int verify_return_error;
-#ifdef FIONBIO
static int c_nbio = 0;
-#endif
static int c_Pause = 0;
static int c_debug = 0;
#ifndef OPENSSL_NO_TLSEXT
BIO_printf(bio_err, " -msg - Show protocol messages\n");
BIO_printf(bio_err, " -nbio_test - more ssl protocol testing\n");
BIO_printf(bio_err, " -state - print the 'ssl' states\n");
-#ifdef FIONBIO
BIO_printf(bio_err, " -nbio - Run with non-blocking IO\n");
-#endif
BIO_printf(bio_err, " -crlf - convert LF from terminal into CRLF\n");
BIO_printf(bio_err, " -quiet - no s_client output\n");
BIO_printf(bio_err, " -ign_eof - ignore input eof (default when -quiet)\n");
}
verify_depth = 0;
verify_error = X509_V_OK;
-#ifdef FIONBIO
c_nbio = 0;
-#endif
argc--;
argv++;
goto bad;
cipher = *(++argv);
}
-#ifdef FIONBIO
else if (strcmp(*argv, "-nbio") == 0) {
c_nbio = 1;
}
-#endif
else if (strcmp(*argv, "-starttls") == 0) {
if (--argc < 1)
goto bad;
}
BIO_printf(bio_c_out, "CONNECTED(%08X)\n", s);
-#ifdef FIONBIO
if (c_nbio) {
unsigned long l = 1;
BIO_printf(bio_c_out, "turning on non blocking io\n");
goto end;
}
}
-#endif
if (c_Pause & 0x01)
SSL_set_debug(con, 1);
tty_on = 1;
if (in_init) {
in_init = 0;
-#if 0 /* This test doesn't really work as intended
+#if 0
+ /* This test doesn't really work as intended
* (needs to be fixed) */
#ifndef OPENSSL_NO_TLSEXT
if (servername != NULL && !SSL_session_reused(con)) {
#undef OPENSSL_NO_DEPRECATED
#endif
+#include <sys/ioctl.h>
+
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
static const char *s_cert_file2 = TEST_CERT2, *s_key_file2 = NULL;
#endif
static char *s_dcert_file = NULL, *s_dkey_file = NULL;
-#ifdef FIONBIO
static int s_nbio = 0;
-#endif
static int s_nbio_test = 0;
int s_crlf = 0;
static SSL_CTX *ctx = NULL;
s_key_file2 = NULL;
ctx2 = NULL;
#endif
-#ifdef FIONBIO
s_nbio = 0;
-#endif
s_nbio_test = 0;
ctx = NULL;
www = 0;
" Use \"openssl ecparam -list_curves\" for all names\n" \
" (default is nistp256).\n");
#endif
-#ifdef FIONBIO
BIO_printf(bio_err, " -nbio - Run with non-blocking IO\n");
-#endif
BIO_printf(bio_err, " -nbio_test - test with the non-blocking test bio\n");
BIO_printf(bio_err, " -crlf - convert LF from terminal into CRLF\n");
BIO_printf(bio_err, " -debug - Print more output\n");
goto end;
verify_depth = 0;
-#ifdef FIONBIO
s_nbio = 0;
-#endif
s_nbio_test = 0;
argc--;
goto bad;
CAfile = *(++argv);
}
-#ifdef FIONBIO
else if (strcmp(*argv, "-nbio") == 0) {
s_nbio = 1;
}
-#endif
else if (strcmp(*argv, "-nbio_test") == 0) {
-#ifdef FIONBIO
s_nbio = 1;
-#endif
s_nbio_test = 1;
} else if (strcmp(*argv, "-debug") == 0) {
s_debug = 1;
BIO_printf(bio_err, "out of memory\n");
goto err;
}
-#ifdef FIONBIO
if (s_nbio) {
unsigned long sl = 1;
if (BIO_socket_ioctl(s, FIONBIO, &sl) < 0)
ERR_print_errors(bio_err);
}
-#endif
if (con == NULL) {
con = SSL_new(ctx);
if ((io == NULL) || (ssl_bio == NULL))
goto err;
-#ifdef FIONBIO
if (s_nbio) {
unsigned long sl = 1;
if (BIO_socket_ioctl(s, FIONBIO, &sl) < 0)
ERR_print_errors(bio_err);
}
-#endif
/* lets make the output buffer a reasonable size */
if (!BIO_set_write_buffer_size(io, bufsize))
static long bytes_read = 0;
static int st_bugs = 0;
static int perform = 0;
-#ifdef FIONBIO
static int t_nbio = 0;
-#endif
static void
s_time_init(void)
st_bugs = 0;
perform = 0;
-#ifdef FIONBIO
t_nbio = 0;
-#endif
}
/***********************************************************************
printf("usage: s_time <args>\n\n");
printf("-connect host:port - host:port to connect to (default is %s)\n", SSL_CONNECT_NAME);
-#ifdef FIONBIO
printf("-nbio - Run with non-blocking IO\n");
printf("-ssl2 - Just use SSLv2\n");
printf("-ssl3 - Just use SSLv3\n");
printf("-new - Just time new connections\n");
printf("-reuse - Just time connection reuse\n");
printf("-www page - Retrieve 'page' from the site\n");
-#endif
printf(umsg, SECONDS);
}
goto bad;
tm_cipher = *(++argv);
}
-#ifdef FIONBIO
else if (strcmp(*argv, "-nbio") == 0) {
t_nbio = 1;
}
-#endif
else if (strcmp(*argv, "-www") == 0) {
if (--argc < 1)
goto bad;