Skip to content

Commit

Permalink
Backout revision b33b017eede5, bug 1432144, r=franziskus
Browse files Browse the repository at this point in the history
  • Loading branch information
kaie committed Feb 27, 2018
1 parent 87f6d27 commit ecfa56e
Show file tree
Hide file tree
Showing 16 changed files with 209 additions and 211 deletions.
5 changes: 1 addition & 4 deletions gtests/ssl_gtest/ssl_0rtt_unittest.cc
Expand Up @@ -518,7 +518,7 @@ TEST_P(TlsConnectTls13, SendTooMuchEarlyData) {
TEST_P(TlsConnectTls13, ReceiveTooMuchEarlyData) {
EnsureTlsSetup();

size_t limit = 5;
const size_t limit = 5;
EXPECT_EQ(SECSuccess, SSL_SetMaxEarlyDataSize(server_->ssl_fd(), limit));
SetupForZeroRtt();

Expand Down Expand Up @@ -548,9 +548,6 @@ TEST_P(TlsConnectTls13, ReceiveTooMuchEarlyData) {
server_->Handshake(); // This reads the early data and maybe throws an error.
if (variant_ == ssl_variant_stream) {
server_->CheckErrorCode(SSL_ERROR_TOO_MUCH_EARLY_DATA);
// We drop the SID when sending the alert such that max_early_data_size is 0
// here.
limit = 0;
} else {
EXPECT_EQ(TlsAgent::STATE_CONNECTING, server_->state());
}
Expand Down
5 changes: 0 additions & 5 deletions gtests/ssl_gtest/ssl_loopback_unittest.cc
Expand Up @@ -532,11 +532,6 @@ INSTANTIATE_TEST_CASE_P(
TlsConnectTestBase::kTlsV11V12));
INSTANTIATE_TEST_CASE_P(Pre13StreamOnly, TlsConnectStreamPre13,
TlsConnectTestBase::kTlsV10ToV12);
INSTANTIATE_TEST_CASE_P(
Pre13Stream, TlsConnectStreamResumptionPre13,
::testing::Combine(TlsConnectTestBase::kTlsVariantsStream,
TlsConnectTestBase::kTlsV10ToV12,
::testing::Values(true, false)));

INSTANTIATE_TEST_CASE_P(Version12Plus, TlsConnectTls12Plus,
::testing::Combine(TlsConnectTestBase::kTlsVariantsAll,
Expand Down
23 changes: 0 additions & 23 deletions gtests/ssl_gtest/ssl_resumption_unittest.cc
Expand Up @@ -1028,27 +1028,4 @@ TEST_P(TlsConnectGenericResumption, ConnectResumeClientAuth) {
SendReceive();
}

// Renegotiate a resumed session.
TEST_P(TlsConnectStreamResumptionPre13, ConnectResumeRenegotiateClient) {
ConfigureSessionCache(RESUME_BOTH, RESUME_BOTH);
Connect();
SendReceive();

Reset();
ConfigureSessionCache(RESUME_BOTH, RESUME_BOTH);
ExpectResumption(RESUME_TICKET);
Connect();

// Disable resumption and prepare for renegotiation.
server_->ExpectResumption(false);
server_->PrepareForRenegotiate();
client_->ExpectResumption(false);
client_->StartRenegotiate();
Handshake();
// Don't CheckConnected its logic doesn't work in this case.
// It assumes a certain number of SIDs, resumed sessions, and cache
// hits/misses.
SendReceive();
}

} // namespace nss_test
4 changes: 1 addition & 3 deletions gtests/ssl_gtest/tls_agent.cc
Expand Up @@ -589,9 +589,7 @@ void TlsAgent::EnableFalseStart() {
SetOption(SSL_ENABLE_FALSE_START, PR_TRUE);
}

void TlsAgent::ExpectResumption(bool expected) {
expect_resumption_ = expected;
}
void TlsAgent::ExpectResumption() { expect_resumption_ = true; }

void TlsAgent::EnableAlpn(const uint8_t* val, size_t len) {
EXPECT_TRUE(EnsureTlsSetup());
Expand Down
2 changes: 1 addition & 1 deletion gtests/ssl_gtest/tls_agent.h
Expand Up @@ -129,7 +129,7 @@ class TlsAgent : public PollTarget {
void SetServerKeyBits(uint16_t bits);
void ExpectReadWriteError();
void EnableFalseStart();
void ExpectResumption(bool expected = true);
void ExpectResumption();
void SkipVersionChecks();
void SetSignatureSchemes(const SSLSignatureScheme* schemes, size_t count);
void EnableAlpn(const uint8_t* val, size_t len);
Expand Down
1 change: 0 additions & 1 deletion gtests/ssl_gtest/tls_connect.h
Expand Up @@ -313,7 +313,6 @@ class TlsConnectDatagramPre13 : public TlsConnectDatagram {

// A variant that is used only with Pre13.
class TlsConnectGenericPre13 : public TlsConnectGeneric {};
class TlsConnectStreamResumptionPre13 : public TlsConnectGenericResumption {};

class TlsKeyExchangeTest : public TlsConnectGeneric {
protected:
Expand Down

0 comments on commit ecfa56e

Please sign in to comment.