Remove in_handshake.
The removes the last of OpenSSL's variables that count occurrences of a
function on the stack.
Change-Id: I1722c6d47bedb47b1613c4a5da01375b5c4cc220
Reviewed-on: https://boringssl-review.googlesource.com/7450
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 71d9b5c..26e504d 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -3961,10 +3961,6 @@
EVP_CIPHER_CTX *enc_read_ctx;
EVP_MD_CTX *read_hash;
- /* in_handshake is non-zero when we are actually in SSL_accept() or
- * SSL_connect() */
- int in_handshake;
-
/* verify_mode is a bitmask of |SSL_VERIFY_*| values. */
uint8_t verify_mode;
diff --git a/ssl/d1_clnt.c b/ssl/d1_clnt.c
index b163cbb..c6a2b13 100644
--- a/ssl/d1_clnt.c
+++ b/ssl/d1_clnt.c
@@ -150,8 +150,6 @@
cb = ssl->ctx->info_callback;
}
- ssl->in_handshake++;
-
for (;;) {
state = ssl->state;
@@ -501,8 +499,6 @@
}
end:
- ssl->in_handshake--;
-
BUF_MEM_free(buf);
if (cb != NULL) {
cb(ssl, SSL_CB_CONNECT_EXIT, ret);
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c
index d4212fb..579d5a2 100644
--- a/ssl/d1_srvr.c
+++ b/ssl/d1_srvr.c
@@ -148,8 +148,6 @@
cb = ssl->ctx->info_callback;
}
- ssl->in_handshake++;
-
for (;;) {
state = ssl->state;
@@ -465,7 +463,6 @@
}
end:
- ssl->in_handshake--;
BUF_MEM_free(buf);
if (cb != NULL) {
cb(ssl, SSL_CB_ACCEPT_EXIT, ret);
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 9569ef0..15f5297 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -189,8 +189,6 @@
cb = ssl->ctx->info_callback;
}
- ssl->in_handshake++;
-
for (;;) {
state = ssl->state;
@@ -574,7 +572,6 @@
}
end:
- ssl->in_handshake--;
BUF_MEM_free(buf);
if (cb != NULL) {
cb(ssl, SSL_CB_CONNECT_EXIT, ret);
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 45b9865..eb92edb 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -192,8 +192,6 @@
cb = ssl->ctx->info_callback;
}
- ssl->in_handshake++;
-
if (ssl->cert == NULL) {
OPENSSL_PUT_ERROR(SSL, SSL_R_NO_CERTIFICATE_SET);
return -1;
@@ -579,7 +577,6 @@
}
end:
- ssl->in_handshake--;
BUF_MEM_free(buf);
if (cb != NULL) {
cb(ssl, SSL_CB_ACCEPT_EXIT, ret);