| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/http/transport_security_state.h" | 5 #include "net/http/transport_security_state.h" |
| 6 | 6 |
| 7 #if defined(USE_OPENSSL) | 7 #if defined(USE_OPENSSL) |
| 8 #include <openssl/ecdsa.h> | 8 #include <openssl/ecdsa.h> |
| 9 #include <openssl/ssl.h> | 9 #include <openssl/ssl.h> |
| 10 #else // !defined(USE_OPENSSL) | 10 #else // !defined(USE_OPENSSL) |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // name is >255 bytes. However, search terms can have those properties. | 257 // name is >255 bytes. However, search terms can have those properties. |
| 258 return std::string(); | 258 return std::string(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 for (size_t i = 0; new_host[i]; i += new_host[i] + 1) { | 261 for (size_t i = 0; new_host[i]; i += new_host[i] + 1) { |
| 262 const unsigned label_length = static_cast<unsigned>(new_host[i]); | 262 const unsigned label_length = static_cast<unsigned>(new_host[i]); |
| 263 if (!label_length) | 263 if (!label_length) |
| 264 break; | 264 break; |
| 265 | 265 |
| 266 for (size_t j = 0; j < label_length; ++j) { | 266 for (size_t j = 0; j < label_length; ++j) { |
| 267 new_host[i + 1 + j] = tolower(new_host[i + 1 + j]); | 267 new_host[i + 1 + j] = static_cast<char>(tolower(new_host[i + 1 + j])); |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 return new_host; | 271 return new_host; |
| 272 } | 272 } |
| 273 | 273 |
| 274 // BitReader is a class that allows a bytestring to be read bit-by-bit. | 274 // BitReader is a class that allows a bytestring to be read bit-by-bit. |
| 275 class BitReader { | 275 class BitReader { |
| 276 public: | 276 public: |
| 277 BitReader(const uint8* bytes, size_t num_bits) | 277 BitReader(const uint8* bytes, size_t num_bits) |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 return pkp.spki_hashes.size() > 0 || pkp.bad_spki_hashes.size() > 0; | 917 return pkp.spki_hashes.size() > 0 || pkp.bad_spki_hashes.size() > 0; |
| 918 } | 918 } |
| 919 | 919 |
| 920 TransportSecurityState::DomainState::PKPState::PKPState() { | 920 TransportSecurityState::DomainState::PKPState::PKPState() { |
| 921 } | 921 } |
| 922 | 922 |
| 923 TransportSecurityState::DomainState::PKPState::~PKPState() { | 923 TransportSecurityState::DomainState::PKPState::~PKPState() { |
| 924 } | 924 } |
| 925 | 925 |
| 926 } // namespace | 926 } // namespace |
| OLD | NEW |