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

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

Issue 453663002: Store client cert hashes as strings instead of StringPieces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Deprecate_flag_quic_allow_port_migration_72668120
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.h ('k') | no next file » | 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_server_config.h" 5 #include "net/quic/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 } 1131 }
1132 1132
1133 const vector<string>* certs; 1133 const vector<string>* certs;
1134 string signature; 1134 string signature;
1135 if (!proof_source_->GetProof(info.sni.as_string(), config.serialized, 1135 if (!proof_source_->GetProof(info.sni.as_string(), config.serialized,
1136 params->x509_ecdsa_supported, &certs, 1136 params->x509_ecdsa_supported, &certs,
1137 &signature)) { 1137 &signature)) {
1138 return; 1138 return;
1139 } 1139 }
1140 1140
1141 client_hello.GetStringPiece(kCCS, &(params->client_common_set_hashes)); 1141 StringPiece client_common_set_hashes;
1142 client_hello.GetStringPiece(kCCRT, &(params->client_cached_cert_hashes)); 1142 client_hello.GetStringPiece(kCCS, &client_common_set_hashes);
1143 params->client_common_set_hashes = client_common_set_hashes.as_string();
1144
1145 StringPiece client_cached_cert_hashes;
1146 client_hello.GetStringPiece(kCCRT, &client_cached_cert_hashes);
1147 params->client_cached_cert_hashes = client_cached_cert_hashes.as_string();
1143 1148
1144 const string compressed = CertCompressor::CompressChain( 1149 const string compressed = CertCompressor::CompressChain(
1145 *certs, params->client_common_set_hashes, 1150 *certs, params->client_common_set_hashes,
1146 params->client_cached_cert_hashes, config.common_cert_sets); 1151 params->client_cached_cert_hashes, config.common_cert_sets);
1147 1152
1148 // kREJOverheadBytes is a very rough estimate of how much of a REJ 1153 // kREJOverheadBytes is a very rough estimate of how much of a REJ
1149 // message is taken up by things other than the certificates. 1154 // message is taken up by things other than the certificates.
1150 // STK: 56 bytes 1155 // STK: 56 bytes
1151 // SNO: 56 bytes 1156 // SNO: 56 bytes
1152 // SCFG 1157 // SCFG
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 QuicCryptoServerConfig::Config::Config() 1552 QuicCryptoServerConfig::Config::Config()
1548 : channel_id_enabled(false), 1553 : channel_id_enabled(false),
1549 is_primary(false), 1554 is_primary(false),
1550 primary_time(QuicWallTime::Zero()), 1555 primary_time(QuicWallTime::Zero()),
1551 priority(0), 1556 priority(0),
1552 source_address_token_boxer(NULL) {} 1557 source_address_token_boxer(NULL) {}
1553 1558
1554 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } 1559 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); }
1555 1560
1556 } // namespace net 1561 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_handshake.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698