Remove is_resume field on TestState.

This wasn't being used and wasn't even set correctly in split handshake
tests.

Change-Id: I03000db8dd3c227ea44e7bacaf3d1341259fae44
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/46384
Reviewed-by: Adam Langley <agl@google.com>
grpc-202302
David Benjamin 4 years ago committed by Adam Langley
parent 04c44d92c9
commit da890de1b5
  1. 2
      ssl/test/bssl_shim.cc
  2. 2
      ssl/test/handshake_util.cc
  3. 2
      ssl/test/handshaker.cc
  4. 3
      ssl/test/test_config.cc
  5. 1
      ssl/test/test_config.h
  6. 1
      ssl/test/test_state.h

@ -692,7 +692,7 @@ static bool DoConnection(bssl::UniquePtr<SSL_SESSION> *out_session,
const TestConfig *retry_config, bool is_resume,
SSL_SESSION *session, SettingsWriter *writer) {
bssl::UniquePtr<SSL> ssl = config->NewSSL(
ssl_ctx, session, is_resume, std::unique_ptr<TestState>(new TestState));
ssl_ctx, session, std::unique_ptr<TestState>(new TestState));
if (!ssl) {
return false;
}

@ -489,7 +489,7 @@ bool DoSplitHandshake(UniquePtr<SSL> *ssl, SettingsWriter *writer,
}
UniquePtr<SSL> ssl_handback =
config->NewSSL((*ssl)->ctx.get(), nullptr, false, nullptr);
config->NewSSL((*ssl)->ctx.get(), nullptr, nullptr);
if (!ssl_handback) {
return false;
}

@ -40,7 +40,7 @@ bool Handshaker(const TestConfig *config, int rfd, int wfd,
if (!ctx) {
return false;
}
UniquePtr<SSL> ssl = config->NewSSL(ctx.get(), nullptr, false, nullptr);
UniquePtr<SSL> ssl = config->NewSSL(ctx.get(), nullptr, nullptr);
// Set |O_NONBLOCK| in order to break out of the loop when we hit
// |SSL_ERROR_WANT_READ|, so that we can send |kControlMsgWantRead| to the

@ -1518,7 +1518,7 @@ static int CertCallback(SSL *ssl, void *arg) {
}
bssl::UniquePtr<SSL> TestConfig::NewSSL(
SSL_CTX *ssl_ctx, SSL_SESSION *session, bool is_resume,
SSL_CTX *ssl_ctx, SSL_SESSION *session,
std::unique_ptr<TestState> test_state) const {
bssl::UniquePtr<SSL> ssl(SSL_new(ssl_ctx));
if (!ssl) {
@ -1532,7 +1532,6 @@ bssl::UniquePtr<SSL> TestConfig::NewSSL(
if (!SetTestState(ssl.get(), std::move(test_state))) {
return nullptr;
}
GetTestState(ssl.get())->is_resume = is_resume;
}
if (fallback_scsv && !SSL_set_mode(ssl.get(), SSL_MODE_SEND_FALLBACK_SCSV)) {

@ -192,7 +192,6 @@ struct TestConfig {
bssl::UniquePtr<SSL_CTX> SetupCtx(SSL_CTX *old_ctx) const;
bssl::UniquePtr<SSL> NewSSL(SSL_CTX *ssl_ctx, SSL_SESSION *session,
bool is_resume,
std::unique_ptr<TestState> test_state) const;
};

@ -56,7 +56,6 @@ struct TestState {
bssl::UniquePtr<SSL_SESSION> new_session;
bool ticket_decrypt_done = false;
bool alpn_select_done = false;
bool is_resume = false;
bool early_callback_ready = false;
bool custom_verify_ready = false;
std::string msg_callback_text;

Loading…
Cancel
Save