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

Side by Side Diff: net/quic/crypto/quic_crypto_client_config.cc

Issue 448313003: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0807
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 unified diff | Download patch
« no previous file with comments | « net/quic/crypto/crypto_handshake.cc ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/crypto/quic_crypto_client_config.h" 5 #include "net/quic/crypto/quic_crypto_client_config.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 if (has_proof && has_cert) { 604 if (has_proof && has_cert) {
605 vector<string> certs; 605 vector<string> certs;
606 if (!CertCompressor::DecompressChain(cert_bytes, cached_certs, 606 if (!CertCompressor::DecompressChain(cert_bytes, cached_certs,
607 common_cert_sets, &certs)) { 607 common_cert_sets, &certs)) {
608 *error_details = "Certificate data invalid"; 608 *error_details = "Certificate data invalid";
609 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; 609 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
610 } 610 }
611 611
612 cached->SetProof(certs, proof); 612 cached->SetProof(certs, proof);
613 } else { 613 } else {
614 cached->ClearProof(); 614 if (proof_verifier() != NULL) {
615 // Secure QUIC: clear existing proof as we have been sent a new SCFG
616 // without matching proof/certs.
617 cached->ClearProof();
618 }
619
615 if (has_proof && !has_cert) { 620 if (has_proof && !has_cert) {
616 *error_details = "Certificate missing"; 621 *error_details = "Certificate missing";
617 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; 622 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
618 } 623 }
619 624
620 if (!has_proof && has_cert) { 625 if (!has_proof && has_cert) {
621 *error_details = "Proof missing"; 626 *error_details = "Proof missing";
622 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER; 627 return QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER;
623 } 628 }
624 } 629 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 return; 856 return;
852 } 857 }
853 858
854 // Update canonical version to point at the "most recent" entry. 859 // Update canonical version to point at the "most recent" entry.
855 canonical_server_map_[suffix_server_id] = server_id; 860 canonical_server_map_[suffix_server_id] = server_id;
856 861
857 server_state->InitializeFrom(*canonical_state); 862 server_state->InitializeFrom(*canonical_state);
858 } 863 }
859 864
860 } // namespace net 865 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_handshake.cc ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698