From 35ed5233c2dce4f50a764b38f79b15f2c3b1c6ac Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 10 Feb 2017 23:35:45 -0500 Subject: [PATCH] Remove an unnecessary state transition. The split was there out of paranoia that some caller may notice the change in initial state. Now that SSL_state is neutered, simplify. BUG=177 Change-Id: I7e2138c2b56821b0c79eec98bb09a82fc28238e8 Reviewed-on: https://boringssl-review.googlesource.com/13828 Reviewed-by: Steven Valdez Reviewed-by: David Benjamin Commit-Queue: David Benjamin CQ-Verified: CQ bot account: commit-bot@chromium.org --- ssl/handshake_client.c | 5 ----- ssl/handshake_server.c | 5 ----- 2 files changed, 10 deletions(-) diff --git a/ssl/handshake_client.c b/ssl/handshake_client.c index 61efd5c1..30e8c43f 100644 --- a/ssl/handshake_client.c +++ b/ssl/handshake_client.c @@ -200,11 +200,6 @@ int ssl3_connect(SSL_HANDSHAKE *hs) { switch (hs->state) { case SSL_ST_INIT: - hs->state = SSL_ST_CONNECT; - skip = 1; - break; - - case SSL_ST_CONNECT: ssl_do_info_callback(ssl, SSL_CB_HANDSHAKE_START, 1); hs->state = SSL3_ST_CW_CLNT_HELLO_A; break; diff --git a/ssl/handshake_server.c b/ssl/handshake_server.c index c352dd95..3e378619 100644 --- a/ssl/handshake_server.c +++ b/ssl/handshake_server.c @@ -212,11 +212,6 @@ int ssl3_accept(SSL_HANDSHAKE *hs) { switch (hs->state) { case SSL_ST_INIT: - hs->state = SSL_ST_ACCEPT; - skip = 1; - break; - - case SSL_ST_ACCEPT: ssl_do_info_callback(ssl, SSL_CB_HANDSHAKE_START, 1); hs->state = SSL3_ST_SR_CLNT_HELLO_A; break;