Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1481)

Unified Diff: net/quic/crypto/crypto_server_test.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/crypto_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/crypto_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698