Loading apps/apps.c +14 −0 Original line number Diff line number Diff line Loading @@ -2884,3 +2884,17 @@ BIO *bio_open_default_quiet(const char *filename, char mode, int format) return bio_open_default_(filename, mode, format, 1); } void wait_for_async(SSL *s) { int width, fd; fd_set asyncfds; fd = SSL_get_async_wait_fd(s); if (fd < 0) return; width = fd + 1; FD_ZERO(&asyncfds); openssl_fdset(fd, &asyncfds); select(width, (void *)&asyncfds, NULL, NULL, NULL); } apps/apps.h +1 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ CONF *app_load_config(const char *filename); CONF *app_load_config_quiet(const char *filename); int app_load_modules(const CONF *config); void unbuffer(FILE *fp); void wait_for_async(SSL *s); /* * Common verification options. Loading apps/s_client.c +2 −0 Original line number Diff line number Diff line Loading @@ -1897,6 +1897,7 @@ int s_client_main(int argc, char **argv) break; case SSL_ERROR_WANT_ASYNC: BIO_printf(bio_c_out, "write A BLOCK\n"); wait_for_async(con); write_ssl = 1; read_tty = 0; break; Loading Loading @@ -1984,6 +1985,7 @@ int s_client_main(int argc, char **argv) break; case SSL_ERROR_WANT_ASYNC: BIO_printf(bio_c_out, "read A BLOCK\n"); wait_for_async(con); write_tty = 0; read_ssl = 1; if ((read_tty == 0) && (write_ssl == 0)) Loading apps/s_server.c +0 −16 Original line number Diff line number Diff line Loading @@ -194,7 +194,6 @@ typedef unsigned int u_int; static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength); #endif static int not_resumable_sess_cb(SSL *s, int is_forward_secure); static void wait_for_async(SSL *s); static int sv_body(char *hostname, int s, int stype, unsigned char *context); static int www_body(char *hostname, int s, int stype, unsigned char *context); static int rev_body(char *hostname, int s, int stype, unsigned char *context); Loading Loading @@ -2008,21 +2007,6 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) SSL_CTX_sess_get_cache_size(ssl_ctx)); } static void wait_for_async(SSL *s) { int width, fd; fd_set asyncfds; fd = SSL_get_async_wait_fd(s); if (fd < 0) return; width = fd + 1; FD_ZERO(&asyncfds); openssl_fdset(fd, &asyncfds); select(width, (void *)&asyncfds, NULL, NULL, NULL); } static int sv_body(char *hostname, int s, int stype, unsigned char *context) { char *buf = NULL; Loading Loading
apps/apps.c +14 −0 Original line number Diff line number Diff line Loading @@ -2884,3 +2884,17 @@ BIO *bio_open_default_quiet(const char *filename, char mode, int format) return bio_open_default_(filename, mode, format, 1); } void wait_for_async(SSL *s) { int width, fd; fd_set asyncfds; fd = SSL_get_async_wait_fd(s); if (fd < 0) return; width = fd + 1; FD_ZERO(&asyncfds); openssl_fdset(fd, &asyncfds); select(width, (void *)&asyncfds, NULL, NULL, NULL); }
apps/apps.h +1 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,7 @@ CONF *app_load_config(const char *filename); CONF *app_load_config_quiet(const char *filename); int app_load_modules(const CONF *config); void unbuffer(FILE *fp); void wait_for_async(SSL *s); /* * Common verification options. Loading
apps/s_client.c +2 −0 Original line number Diff line number Diff line Loading @@ -1897,6 +1897,7 @@ int s_client_main(int argc, char **argv) break; case SSL_ERROR_WANT_ASYNC: BIO_printf(bio_c_out, "write A BLOCK\n"); wait_for_async(con); write_ssl = 1; read_tty = 0; break; Loading Loading @@ -1984,6 +1985,7 @@ int s_client_main(int argc, char **argv) break; case SSL_ERROR_WANT_ASYNC: BIO_printf(bio_c_out, "read A BLOCK\n"); wait_for_async(con); write_tty = 0; read_ssl = 1; if ((read_tty == 0) && (write_ssl == 0)) Loading
apps/s_server.c +0 −16 Original line number Diff line number Diff line Loading @@ -194,7 +194,6 @@ typedef unsigned int u_int; static RSA *tmp_rsa_cb(SSL *s, int is_export, int keylength); #endif static int not_resumable_sess_cb(SSL *s, int is_forward_secure); static void wait_for_async(SSL *s); static int sv_body(char *hostname, int s, int stype, unsigned char *context); static int www_body(char *hostname, int s, int stype, unsigned char *context); static int rev_body(char *hostname, int s, int stype, unsigned char *context); Loading Loading @@ -2008,21 +2007,6 @@ static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) SSL_CTX_sess_get_cache_size(ssl_ctx)); } static void wait_for_async(SSL *s) { int width, fd; fd_set asyncfds; fd = SSL_get_async_wait_fd(s); if (fd < 0) return; width = fd + 1; FD_ZERO(&asyncfds); openssl_fdset(fd, &asyncfds); select(width, (void *)&asyncfds, NULL, NULL, NULL); } static int sv_body(char *hostname, int s, int stype, unsigned char *context) { char *buf = NULL; Loading