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

Unified Diff: net/quic/quic_stream_factory.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_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 2ca1ed331ec4c3e2223e5ee50f83804f51df828f..3aec036970a4ac855d9c45c8a6547e8980d4055e 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -35,6 +35,10 @@
#include "net/quic/quic_session_key.h"
#include "net/socket/client_socket_factory.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
using std::string;
using std::vector;
@@ -56,6 +60,15 @@ void HistogramCreateSessionFailure(enum CreateSessionFailure error) {
CREATION_ERROR_MAX);
}
+bool IsEcdsaSupported() {
+#if defined(OS_WIN)
+ if (base::win::GetVersion() < base::win::VERSION_VISTA)
+ return false;
+#endif
+
+ return true;
+}
+
} // namespace
QuicStreamFactory::IpAliasKey::IpAliasKey() {}
@@ -397,9 +410,10 @@ QuicStreamFactory::QuicStreamFactory(
crypto_config_.AddCanonicalSuffix(".googlevideo.com");
crypto_config_.SetProofVerifier(new ProofVerifierChromium(cert_verifier));
base::CPU cpu;
- if (cpu.has_aesni() && cpu.has_avx()) {
+ if (cpu.has_aesni() && cpu.has_avx())
crypto_config_.PreferAesGcm();
- }
+ if (!IsEcdsaSupported())
+ crypto_config_.DisableEcdsa();
}
QuicStreamFactory::~QuicStreamFactory() {
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698