提交 fd068d50 编写于 作者: M Matt Caswell

Ensure s_client and s_server work when read_ahead is set

Previously s_client and s_server relied on using SSL_pending() which does
not take into account read_ahead. For read pipelining to work, read_ahead
gets set automatically. Therefore s_client and s_server have been
converted to use SSL_has_pending() instead.
Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 49580f25
......@@ -2183,7 +2183,7 @@ int s_client_main(int argc, char **argv)
}
}
ssl_pending = read_ssl && SSL_pending(con);
ssl_pending = read_ssl && SSL_has_pending(con);
if (!ssl_pending) {
#if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_NETWARE)
......
......@@ -2213,7 +2213,7 @@ static int sv_body(int s, int stype, unsigned char *context)
int read_from_sslcon;
read_from_terminal = 0;
read_from_sslcon = SSL_pending(con)
read_from_sslcon = SSL_has_pending(con)
|| (async && SSL_waiting_for_async(con));
if (!read_from_sslcon) {
......@@ -2451,7 +2451,7 @@ static int sv_body(int s, int stype, unsigned char *context)
ascii2ebcdic(buf, buf, i);
#endif
raw_write_stdout(buf, (unsigned int)i);
if (SSL_pending(con))
if (SSL_has_pending(con))
goto again;
break;
case SSL_ERROR_WANT_ASYNC:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册