Fold num_renegotiations into total_renegotiations.

The only difference is SSL_clear_num_renegotiations which is never
called.

Change-Id: Id661c71e89d34d834349ad1f1a296e332606e6cc
Reviewed-on: https://boringssl-review.googlesource.com/4564
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2015-04-26 19:08:48 -04:00 committed by Adam Langley
parent 71f7d3d2e1
commit 7cde0dee7c
3 changed files with 0 additions and 13 deletions

View File

@ -1581,7 +1581,6 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
#define SSL_CTRL_GET_SESSION_REUSED 8
#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9
#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10
#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11
#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12
#define SSL_CTRL_GET_FLAGS 13
#define SSL_CTRL_EXTRA_CHAIN_CERT 14
@ -1652,8 +1651,6 @@ OPENSSL_EXPORT int DTLSv1_handle_timeout(SSL *ssl);
SSL_ctrl((ssl), SSL_CTRL_GET_SESSION_REUSED, 0, NULL)
#define SSL_num_renegotiations(ssl) \
SSL_ctrl((ssl), SSL_CTRL_GET_NUM_RENEGOTIATIONS, 0, NULL)
#define SSL_clear_num_renegotiations(ssl) \
SSL_ctrl((ssl), SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS, 0, NULL)
#define SSL_total_renegotiations(ssl) \
SSL_ctrl((ssl), SSL_CTRL_GET_TOTAL_RENEGOTIATIONS, 0, NULL)

View File

@ -409,7 +409,6 @@ typedef struct ssl3_state_st {
* no more data in the read or write buffers */
int renegotiate;
int total_renegotiations;
int num_renegotiations;
/* State pertaining to the pending handshake.
*

View File

@ -589,14 +589,6 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg) {
break;
case SSL_CTRL_GET_NUM_RENEGOTIATIONS:
ret = s->s3->num_renegotiations;
break;
case SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS:
ret = s->s3->num_renegotiations;
s->s3->num_renegotiations = 0;
break;
case SSL_CTRL_GET_TOTAL_RENEGOTIATIONS:
ret = s->s3->total_renegotiations;
break;
@ -1249,7 +1241,6 @@ int ssl3_renegotiate_check(SSL *s) {
* need to go to SSL_ST_ACCEPT. */
s->state = SSL_ST_RENEGOTIATE;
s->s3->renegotiate = 0;
s->s3->num_renegotiations++;
s->s3->total_renegotiations++;
return 1;
}