| OLD | NEW |
| 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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 StringPiece client_common_set_hashes; | 1141 StringPiece client_common_set_hashes; |
| 1142 client_hello.GetStringPiece(kCCS, &client_common_set_hashes); | 1142 if (client_hello.GetStringPiece(kCCS, &client_common_set_hashes)) { |
| 1143 params->client_common_set_hashes = client_common_set_hashes.as_string(); | 1143 params->client_common_set_hashes = client_common_set_hashes.as_string(); |
| 1144 } |
| 1144 | 1145 |
| 1145 StringPiece client_cached_cert_hashes; | 1146 StringPiece client_cached_cert_hashes; |
| 1146 client_hello.GetStringPiece(kCCRT, &client_cached_cert_hashes); | 1147 if (client_hello.GetStringPiece(kCCRT, &client_cached_cert_hashes)) { |
| 1147 params->client_cached_cert_hashes = client_cached_cert_hashes.as_string(); | 1148 params->client_cached_cert_hashes = client_cached_cert_hashes.as_string(); |
| 1149 } |
| 1148 | 1150 |
| 1149 const string compressed = CertCompressor::CompressChain( | 1151 const string compressed = CertCompressor::CompressChain( |
| 1150 *certs, params->client_common_set_hashes, | 1152 *certs, params->client_common_set_hashes, |
| 1151 params->client_cached_cert_hashes, config.common_cert_sets); | 1153 params->client_cached_cert_hashes, config.common_cert_sets); |
| 1152 | 1154 |
| 1153 // kREJOverheadBytes is a very rough estimate of how much of a REJ | 1155 // kREJOverheadBytes is a very rough estimate of how much of a REJ |
| 1154 // message is taken up by things other than the certificates. | 1156 // message is taken up by things other than the certificates. |
| 1155 // STK: 56 bytes | 1157 // STK: 56 bytes |
| 1156 // SNO: 56 bytes | 1158 // SNO: 56 bytes |
| 1157 // SCFG | 1159 // SCFG |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 QuicCryptoServerConfig::Config::Config() | 1554 QuicCryptoServerConfig::Config::Config() |
| 1553 : channel_id_enabled(false), | 1555 : channel_id_enabled(false), |
| 1554 is_primary(false), | 1556 is_primary(false), |
| 1555 primary_time(QuicWallTime::Zero()), | 1557 primary_time(QuicWallTime::Zero()), |
| 1556 priority(0), | 1558 priority(0), |
| 1557 source_address_token_boxer(NULL) {} | 1559 source_address_token_boxer(NULL) {} |
| 1558 | 1560 |
| 1559 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } | 1561 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } |
| 1560 | 1562 |
| 1561 } // namespace net | 1563 } // namespace net |
| OLD | NEW |