From 90eeb11652c530dfdcb8d5dc31359d7a0822ecae Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 2 Dec 2014 03:32:38 -0500 Subject: [PATCH] Remove SSL_set_debug. It just inserts extra flushes everywhere and isn't used. Change-Id: I082e4bada405611f4986ba852dd5575265854036 Reviewed-on: https://boringssl-review.googlesource.com/2456 Reviewed-by: Adam Langley --- include/openssl/ssl.h | 4 ---- ssl/d1_clnt.c | 6 ------ ssl/d1_srvr.c | 7 ------- ssl/s23_clnt.c | 2 -- ssl/s3_clnt.c | 6 ------ ssl/s3_srvr.c | 7 ------- ssl/ssl_lib.c | 5 ----- 7 files changed, 37 deletions(-) diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index c43102217..9d33c0227 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1285,9 +1285,6 @@ struct ssl_st unsigned char *psk, unsigned int max_psk_len); SSL_CTX *ctx; - /* set this flag to 1 and a sleep(1) is put into all SSL_read() - * and SSL_write() calls, good for nbio debuging :-) */ - int debug; /* extra application data */ long verify_result; @@ -2176,7 +2173,6 @@ OPENSSL_EXPORT const char *SSL_COMP_get_name(const void *comp); OPENSSL_EXPORT void *SSL_COMP_get_compression_methods(void); OPENSSL_EXPORT int SSL_COMP_add_compression_method(int id,void *cm); -OPENSSL_EXPORT void SSL_set_debug(SSL *s, int debug); OPENSSL_EXPORT int SSL_cache_hit(SSL *s); OPENSSL_EXPORT int SSL_is_server(SSL *s); diff --git a/ssl/d1_clnt.c b/ssl/d1_clnt.c index f291549f4..746f2600e 100644 --- a/ssl/d1_clnt.c +++ b/ssl/d1_clnt.c @@ -520,12 +520,6 @@ int dtls1_connect(SSL *s) /* did we do anything */ if (!s->s3->tmp.reuse_message && !skip) { - if (s->debug) - { - if ((ret=BIO_flush(s->wbio)) <= 0) - goto end; - } - if ((cb != NULL) && (s->state != state)) { new_state=s->state; diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 38da3561e..058235676 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -579,13 +579,6 @@ int dtls1_accept(SSL *s) if (!s->s3->tmp.reuse_message && !skip) { - if (s->debug) - { - if ((ret=BIO_flush(s->wbio)) <= 0) - goto end; - } - - if ((cb != NULL) && (s->state != state)) { new_state=s->state; diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 6be12609e..cc1b41b9d 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -210,8 +210,6 @@ int ssl23_connect(SSL *s) /* break; */ } - if (s->debug) { (void)BIO_flush(s->wbio); } - if ((cb != NULL) && (s->state != state)) { new_state=s->state; diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index cbde84f97..80c315437 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -567,12 +567,6 @@ int ssl3_connect(SSL *s) /* did we do anything */ if (!s->s3->tmp.reuse_message && !skip) { - if (s->debug) - { - if ((ret=BIO_flush(s->wbio)) <= 0) - goto end; - } - if ((cb != NULL) && (s->state != state)) { new_state=s->state; diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 998f1b4fc..a513b733f 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -657,13 +657,6 @@ int ssl3_accept(SSL *s) if (!s->s3->tmp.reuse_message && !skip) { - if (s->debug) - { - if ((ret=BIO_flush(s->wbio)) <= 0) - goto end; - } - - if ((cb != NULL) && (s->state != state)) { new_state=s->state; diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index fef0649e2..535baeb2d 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3130,11 +3130,6 @@ void ssl_clear_hash_ctx(EVP_MD_CTX **hash) *hash=NULL; } -void SSL_set_debug(SSL *s, int debug) - { - s->debug = debug; - } - int SSL_cache_hit(SSL *s) { return s->hit;