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

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

Issue 1904213002: QUIC: support diversified keys with version 33. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hkdf
Patch Set: Rebase Created 4 years, 8 months 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/aead_base_decrypter.cc ('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 430bcf191dd4859229eed7afe918b0662224b80b..48232016aa2af8ce390103feb71b3584953b0331 100644
--- a/net/quic/crypto/crypto_server_test.cc
+++ b/net/quic/crypto/crypto_server_test.cc
@@ -296,6 +296,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
bool should_succeed,
const char* error_substr) {
IPAddress server_ip;
+ DiversificationNonce diversification_nonce;
string error_details;
QuicConnectionId server_designated_connection_id =
rand_for_id_generation_.RandUint64();
@@ -304,7 +305,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
supported_versions_.front(), supported_versions_,
use_stateless_rejects_, server_designated_connection_id, &clock_, rand_,
&compressed_certs_cache_, &params_, &crypto_proof_, &out_,
- &error_details);
+ &diversification_nonce, &error_details);
if (should_succeed) {
ASSERT_EQ(error, QUIC_NO_ERROR) << "Message failed with error "
@@ -817,10 +818,17 @@ TEST_P(CryptoServerTest, NoServerNonce) {
ShouldSucceed(msg);
- CheckRejectTag();
- const HandshakeFailureReason kRejectReasons[] = {
- SERVER_NONCE_REQUIRED_FAILURE};
- CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
+ if (client_version_ <= QUIC_VERSION_32) {
+ CheckRejectTag();
+ const HandshakeFailureReason kRejectReasons[] = {
+ SERVER_NONCE_REQUIRED_FAILURE};
+ CheckRejectReasons(kRejectReasons, arraysize(kRejectReasons));
+ } else {
+ // Even without a server nonce, this ClientHello should be accepted in
+ // version 33.
+ ASSERT_EQ(kSHLO, out_.tag());
+ CheckServerHello(out_);
+ }
}
TEST_P(CryptoServerTest, ProofForSuppliedServerConfig) {
« no previous file with comments | « net/quic/crypto/aead_base_decrypter.cc ('k') | net/quic/crypto/crypto_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698