| Index: net/quic/crypto/crypto_server_test.cc
|
| diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc
|
| index 52b4baaa6b0d4b566120a5630737c1e6779a1804..427c1cf99573f69bec67839984858844860a441a 100644
|
| --- a/net/quic/crypto/crypto_server_test.cc
|
| +++ b/net/quic/crypto/crypto_server_test.cc
|
| @@ -115,6 +115,8 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
|
| CryptoTestUtils::FakeProofSourceForTesting()) {
|
| #endif
|
| supported_versions_ = GetParam().supported_versions;
|
| + config_.set_enable_serving_sct(true);
|
| +
|
| client_version_ = supported_versions_.front();
|
| client_version_string_ =
|
| QuicUtils::TagToString(QuicVersionToQuicTag(client_version_));
|
| @@ -149,6 +151,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
|
| "KEXS", "C255",
|
| "PUBS", pub_hex_.c_str(),
|
| "NONC", nonce_hex_.c_str(),
|
| + "CSCT", "",
|
| "VER\0", client_version_string_.c_str(),
|
| "$padding", static_cast<int>(kClientHelloMinimumSize),
|
| nullptr);
|
| @@ -348,6 +351,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
|
| const vector<string>* certs;
|
| IPAddressNumber server_ip;
|
| string sig;
|
| + string cert_sct;
|
| #if defined(USE_OPENSSL)
|
| scoped_ptr<ProofSource> proof_source(
|
| CryptoTestUtils::ProofSourceForTesting());
|
| @@ -355,7 +359,8 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
|
| scoped_ptr<ProofSource> proof_source(
|
| CryptoTestUtils::FakeProofSourceForTesting());
|
| #endif
|
| - if (!proof_source->GetProof(server_ip, "", "", false, &certs, &sig) ||
|
| + if (!proof_source->GetProof(server_ip, "", "", false, &certs, &sig,
|
| + &cert_sct) ||
|
| certs->empty()) {
|
| return "#0100000000000000";
|
| }
|
| @@ -440,14 +445,17 @@ TEST_P(CryptoServerTest, DefaultCert) {
|
| // clang-format on
|
|
|
| ShouldSucceed(msg);
|
| - StringPiece cert, proof;
|
| + StringPiece cert, proof, cert_sct;
|
| EXPECT_TRUE(out_.GetStringPiece(kCertificateTag, &cert));
|
| EXPECT_TRUE(out_.GetStringPiece(kPROF, &proof));
|
| + EXPECT_EQ(client_version_ > QUIC_VERSION_29,
|
| + out_.GetStringPiece(kCertificateSCTTag, &cert_sct));
|
| EXPECT_NE(0u, cert.size());
|
| EXPECT_NE(0u, proof.size());
|
| const HandshakeFailureReason kRejectReasons[] = {
|
| SERVER_CONFIG_INCHOATE_HELLO_FAILURE};
|
| CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
|
| + EXPECT_EQ(client_version_ > QUIC_VERSION_29, cert_sct.size() > 0);
|
| }
|
|
|
| TEST_P(CryptoServerTest, TooSmall) {
|
|
|