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

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

Issue 209413005: Move Window's specific logic for disabling ECDSA from QuicCryptoyclientConfig (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 9 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/quic_crypto_client_config.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_client_config_test.cc
diff --git a/net/quic/crypto/quic_crypto_client_config_test.cc b/net/quic/crypto/quic_crypto_client_config_test.cc
index 5b5dbe0cab44aa5baa9d5c795fc6d72567fd35f8..b74a37a921e513b6bb8ea06ef257e468edb433ca 100644
--- a/net/quic/crypto/quic_crypto_client_config_test.cc
+++ b/net/quic/crypto/quic_crypto_client_config_test.cc
@@ -74,6 +74,35 @@ TEST(QuicCryptoClientConfigTest, PreferAesGcm) {
EXPECT_EQ(kAESG, config.aead[0]);
}
+TEST(QuicCryptoClientConfigTest, InchoateChloSecure) {
+ QuicCryptoClientConfig::CachedState state;
+ QuicCryptoClientConfig config;
+ QuicCryptoNegotiatedParameters params;
+ CryptoHandshakeMessage msg;
+ QuicSessionKey server_key("www.google.com", 443, true, kPrivacyModeDisabled);
+ config.FillInchoateClientHello(server_key, QuicVersionMax(), &state,
+ &params, &msg);
+
+ QuicTag pdmd;
+ EXPECT_EQ(QUIC_NO_ERROR, msg.GetUint32(kPDMD, &pdmd));
+ EXPECT_EQ(kX509, pdmd);
+}
+
+TEST(QuicCryptoClientConfigTest, InchoateChloSecureNoEcdsa) {
+ QuicCryptoClientConfig::CachedState state;
+ QuicCryptoClientConfig config;
+ config.DisableEcdsa();
+ QuicCryptoNegotiatedParameters params;
+ CryptoHandshakeMessage msg;
+ QuicSessionKey server_key("www.google.com", 443, true, kPrivacyModeDisabled);
+ config.FillInchoateClientHello(server_key, QuicVersionMax(), &state,
+ &params, &msg);
+
+ QuicTag pdmd;
+ EXPECT_EQ(QUIC_NO_ERROR, msg.GetUint32(kPDMD, &pdmd));
+ EXPECT_EQ(kX59R, pdmd);
+}
+
TEST(QuicCryptoClientConfigTest, ProcessServerDowngradeAttack) {
QuicVersionVector supported_versions = QuicSupportedVersions();
if (supported_versions.size() == 1) {
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698