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

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

Issue 453693002: Check return value of GetStringPiece for (optional) kCCRT/kCCS in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Store_client_cert_hashes_72724874
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | 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 2e804df96a620abd88027ab40e8937304c5a82a3..bfd3ed34982a946a174c0c2bf07ad4452119faf6 100644
--- a/net/quic/crypto/quic_crypto_server_config.cc
+++ b/net/quic/crypto/quic_crypto_server_config.cc
@@ -1139,12 +1139,14 @@ void QuicCryptoServerConfig::BuildRejection(
}
StringPiece client_common_set_hashes;
- client_hello.GetStringPiece(kCCS, &client_common_set_hashes);
- params->client_common_set_hashes = client_common_set_hashes.as_string();
+ if (client_hello.GetStringPiece(kCCS, &client_common_set_hashes)) {
+ params->client_common_set_hashes = client_common_set_hashes.as_string();
+ }
StringPiece client_cached_cert_hashes;
- client_hello.GetStringPiece(kCCRT, &client_cached_cert_hashes);
- params->client_cached_cert_hashes = client_cached_cert_hashes.as_string();
+ if (client_hello.GetStringPiece(kCCRT, &client_cached_cert_hashes)) {
+ params->client_cached_cert_hashes = client_cached_cert_hashes.as_string();
+ }
const string compressed = CertCompressor::CompressChain(
*certs, params->client_common_set_hashes,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698