Remove explicit setting of read_ahead for DTLS. It never makes sense not to
use read_ahead with DTLS because it doesn't work. Therefore read_ahead needs
to be the default.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit f400241251)
This commit is contained in:
@@ -1295,12 +1295,6 @@ int MAIN(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
if (exc)
|
if (exc)
|
||||||
ssl_ctx_set_excert(ctx, exc);
|
ssl_ctx_set_excert(ctx, exc);
|
||||||
/*
|
|
||||||
* DTLS: partial reads end up discarding unread UDP bytes :-( Setting
|
|
||||||
* read ahead solves this problem.
|
|
||||||
*/
|
|
||||||
if (socket_type == SOCK_DGRAM)
|
|
||||||
SSL_CTX_set_read_ahead(ctx, 1);
|
|
||||||
|
|
||||||
#if !defined(OPENSSL_NO_TLSEXT)
|
#if !defined(OPENSSL_NO_TLSEXT)
|
||||||
# if !defined(OPENSSL_NO_NEXTPROTONEG)
|
# if !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||||
|
|||||||
@@ -1736,12 +1736,6 @@ int MAIN(int argc, char *argv[])
|
|||||||
SSL_CTX_set_options(ctx, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
|
SSL_CTX_set_options(ctx, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
|
||||||
if (exc)
|
if (exc)
|
||||||
ssl_ctx_set_excert(ctx, exc);
|
ssl_ctx_set_excert(ctx, exc);
|
||||||
/*
|
|
||||||
* DTLS: partial reads end up discarding unread UDP bytes :-( Setting
|
|
||||||
* read ahead solves this problem.
|
|
||||||
*/
|
|
||||||
if (socket_type == SOCK_DGRAM)
|
|
||||||
SSL_CTX_set_read_ahead(ctx, 1);
|
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
SSL_CTX_set_info_callback(ctx, apps_ssl_info_callback);
|
SSL_CTX_set_info_callback(ctx, apps_ssl_info_callback);
|
||||||
@@ -1821,12 +1815,6 @@ int MAIN(int argc, char *argv[])
|
|||||||
SSL_CTX_set_options(ctx2, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
|
SSL_CTX_set_options(ctx2, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
|
||||||
if (exc)
|
if (exc)
|
||||||
ssl_ctx_set_excert(ctx2, exc);
|
ssl_ctx_set_excert(ctx2, exc);
|
||||||
/*
|
|
||||||
* DTLS: partial reads end up discarding unread UDP bytes :-(
|
|
||||||
* Setting read ahead solves this problem.
|
|
||||||
*/
|
|
||||||
if (socket_type == SOCK_DGRAM)
|
|
||||||
SSL_CTX_set_read_ahead(ctx2, 1);
|
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
SSL_CTX_set_info_callback(ctx2, apps_ssl_info_callback);
|
SSL_CTX_set_info_callback(ctx2, apps_ssl_info_callback);
|
||||||
|
|||||||
Reference in New Issue
Block a user