Skip to content

Commit

Permalink
Fix clang-format bustage. r=me
Browse files Browse the repository at this point in the history
  • Loading branch information
ekr committed Oct 5, 2016
1 parent 15d8067 commit 50b1d1f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
1 change: 0 additions & 1 deletion external_tests/ssl_gtest/ssl_ecdh_unittest.cc
Expand Up @@ -277,7 +277,6 @@ TEST_P(TlsConnectGeneric, P256ClientAndCurve25519Server) {
server_->CheckErrorCode(SSL_ERROR_NO_CYPHER_OVERLAP);
}


// Replace the point in the client key exchange message with an empty one
class ECCClientKEXFilter : public TlsHandshakeFilter {
public:
Expand Down
27 changes: 16 additions & 11 deletions external_tests/ssl_gtest/ssl_extension_unittest.cc
Expand Up @@ -531,13 +531,16 @@ TEST_F(TlsExtensionTest13Stream, WrongServerKeyShare) {
const uint16_t wrong_group = ssl_grp_ec_secp384r1;

static const uint8_t key_share[] = {
wrong_group >> 8, wrong_group & 0xff, // Group we didn't offer.
0x00, 0x02, // length = 2
0x01, 0x02 };
wrong_group >> 8,
wrong_group & 0xff, // Group we didn't offer.
0x00,
0x02, // length = 2
0x01,
0x02};
DataBuffer buf(key_share, sizeof(key_share));
EnsureTlsSetup();
server_->SetPacketFilter(new TlsExtensionReplacer(ssl_tls13_key_share_xtn,
buf));
server_->SetPacketFilter(
new TlsExtensionReplacer(ssl_tls13_key_share_xtn, buf));
ConnectExpectFail();
EXPECT_EQ(SSL_ERROR_RX_MALFORMED_KEY_SHARE, client_->error_code());
EXPECT_EQ(SSL_ERROR_BAD_MAC_READ, server_->error_code());
Expand All @@ -548,19 +551,21 @@ TEST_F(TlsExtensionTest13Stream, UnknownServerKeyShare) {
const uint16_t wrong_group = 0xffff;

static const uint8_t key_share[] = {
wrong_group >> 8, wrong_group & 0xff, // Group we didn't offer.
0x00, 0x02, // length = 2
0x01, 0x02 };
wrong_group >> 8,
wrong_group & 0xff, // Group we didn't offer.
0x00,
0x02, // length = 2
0x01,
0x02};
DataBuffer buf(key_share, sizeof(key_share));
EnsureTlsSetup();
server_->SetPacketFilter(new TlsExtensionReplacer(ssl_tls13_key_share_xtn,
buf));
server_->SetPacketFilter(
new TlsExtensionReplacer(ssl_tls13_key_share_xtn, buf));
ConnectExpectFail();
EXPECT_EQ(SSL_ERROR_MISSING_KEY_SHARE, client_->error_code());
EXPECT_EQ(SSL_ERROR_BAD_MAC_READ, server_->error_code());
}


TEST_F(TlsExtensionTest13Stream, DropServerSignatureAlgorithms) {
EnsureTlsSetup();
server_->SetPacketFilter(
Expand Down
4 changes: 2 additions & 2 deletions external_tests/ssl_gtest/tls_connect.cc
Expand Up @@ -486,8 +486,8 @@ void TlsConnectTestBase::SetupForResume() {
}

void TlsConnectTestBase::ZeroRttSendReceive(
bool expect_writable,
bool expect_readable, std::function<bool()> post_clienthello_check) {
bool expect_writable, bool expect_readable,
std::function<bool()> post_clienthello_check) {
const char* k0RttData = "ABCDEF";
const PRInt32 k0RttDataLen = static_cast<PRInt32>(strlen(k0RttData));

Expand Down
3 changes: 1 addition & 2 deletions external_tests/ssl_gtest/tls_connect.h
Expand Up @@ -99,8 +99,7 @@ class TlsConnectTestBase : public ::testing::Test {
void SetupForZeroRtt();
void SetupForResume();
void ZeroRttSendReceive(
bool expect_writable,
bool expect_readable,
bool expect_writable, bool expect_readable,
std::function<bool()> post_clienthello_check = nullptr);
void Receive(size_t amount);
void ExpectExtendedMasterSecret(bool expected);
Expand Down

0 comments on commit 50b1d1f

Please sign in to comment.