summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-02-05 11:47:02 -0500
committerRich Salz <rsalz@openssl.org>2015-02-05 11:47:02 -0500
commit8dd94afb18b27edd987b471914a616f9800a5e58 (patch)
tree8b61cf9813f6543260b90f0a3cc810348415503e /ssl
parent7e35f06ea908e47f87b723b5e951ffc55463eb8b (diff)
Live code cleanup; #if 1 removal
A few minor cleanups to remove pre-processor "#if 1" stuff. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_lib.c4
-rw-r--r--ssl/s3_pkt.c4
-rw-r--r--ssl/ssl_cert.c4
-rw-r--r--ssl/ssl_lib.c2
4 files changed, 0 insertions, 14 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 7a07a24464..320d4a514c 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -4518,9 +4518,7 @@ int ssl3_shutdown(SSL *s)
if (!(s->shutdown & SSL_SENT_SHUTDOWN)) {
s->shutdown |= SSL_SENT_SHUTDOWN;
-#if 1
ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY);
-#endif
/*
* our shutdown alert has been sent now, and if it still needs to be
* written, s->s3->alert_dispatch will be true
@@ -4529,7 +4527,6 @@ int ssl3_shutdown(SSL *s)
return (-1); /* return WANT_WRITE */
} else if (s->s3->alert_dispatch) {
/* resend it if not sent */
-#if 1
ret = s->method->ssl_dispatch_alert(s);
if (ret == -1) {
/*
@@ -4539,7 +4536,6 @@ int ssl3_shutdown(SSL *s)
*/
return (ret);
}
-#endif
} else if (!(s->shutdown & SSL_RECEIVED_SHUTDOWN)) {
/*
* If we are waiting for a close from our peer, we are closed
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index a8fd16c096..5b8fe5c56d 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -906,11 +906,7 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
if ((sess == NULL) ||
(s->enc_write_ctx == NULL) ||
(EVP_MD_CTX_md(s->write_hash) == NULL)) {
-#if 1
clear = s->enc_write_ctx ? 0 : 1; /* must be AEAD cipher */
-#else
- clear = 1;
-#endif
mac_size = 0;
} else {
mac_size = EVP_MD_CTX_size(s->write_hash);
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 1178d43fa0..d81e06b582 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -739,11 +739,7 @@ int ssl_verify_cert_chain(SSL *s, STACK_OF(X509) *sk)
X509_STORE_CTX_set_verify_cb(&ctx, s->verify_callback);
if (s->ctx->app_verify_callback != NULL)
-#if 1 /* new with OpenSSL 0.9.7 */
i = s->ctx->app_verify_callback(&ctx, s->ctx->app_verify_arg);
-#else
- i = s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */
-#endif
else {
i = X509_verify_cert(&ctx);
# if 0
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index bcb6be133a..4289fb9581 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -245,7 +245,6 @@ int SSL_clear(SSL *s)
s->first_packet = 0;
-#if 1
/*
* Check to see if we were changed into a different method, if so, revert
* back if we are not doing session-id reuse.
@@ -257,7 +256,6 @@ int SSL_clear(SSL *s)
if (!s->method->ssl_new(s))
return (0);
} else
-#endif
s->method->ssl_clear(s);
return (1);
}