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

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

Issue 2126053003: Require support for X509 certificates in QUIC CHLO PDMDs. Protected by --quic_require_x509 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126432842
Patch Set: Created 4 years, 5 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/crypto_server_test.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_crypto_server_config.cc
diff --git a/net/quic/crypto/quic_crypto_server_config.cc b/net/quic/crypto/quic_crypto_server_config.cc
index e5b51dd14ebda3a50bc899aa0f3da201dfc9caa0..4f0e11440d4b664b959138fe0d87473335e16170 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -604,6 +604,10 @@ QuicErrorCode QuicCryptoServerConfig::ProcessClientHello(
bool x509_supported = false;
bool x509_ecdsa_supported = false;
ParseProofDemand(client_hello, &x509_supported, &x509_ecdsa_supported);
+ if (!x509_supported && FLAGS_quic_require_x509) {
+ *error_details = "Missing or invalid PDMD";
+ return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
+ }
DCHECK(proof_source_.get());
string chlo_hash;
CryptoUtils::HashHandshakeMessage(client_hello, &chlo_hash);
@@ -1254,7 +1258,8 @@ void QuicCryptoServerConfig::BuildRejection(
bool x509_supported = false;
ParseProofDemand(client_hello, &x509_supported,
&params->x509_ecdsa_supported);
- if (!x509_supported) {
+ if (!x509_supported && FLAGS_quic_require_x509) {
+ QUIC_BUG << "x509 certificates not supported in proof demand";
return;
}
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698