| 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/ssl/server_bound_cert_service.h" | 5 #include "net/ssl/server_bound_cert_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 is_system_time_valid_ = x509_util::IsSupportedValidityRange(start, end); | 406 is_system_time_valid_ = x509_util::IsSupportedValidityRange(start, end); |
| 407 } | 407 } |
| 408 | 408 |
| 409 ServerBoundCertService::~ServerBoundCertService() { | 409 ServerBoundCertService::~ServerBoundCertService() { |
| 410 STLDeleteValues(&inflight_); | 410 STLDeleteValues(&inflight_); |
| 411 } | 411 } |
| 412 | 412 |
| 413 //static | 413 //static |
| 414 std::string ServerBoundCertService::GetDomainForHost(const std::string& host) { | 414 std::string ServerBoundCertService::GetDomainForHost(const std::string& host) { |
| 415 std::string domain = | 415 std::string domain = |
| 416 RegistryControlledDomainService::GetDomainAndRegistry(host); | 416 registry_controlled_domains::GetDomainAndRegistry( |
| 417 host, registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); |
| 417 if (domain.empty()) | 418 if (domain.empty()) |
| 418 return host; | 419 return host; |
| 419 return domain; | 420 return domain; |
| 420 } | 421 } |
| 421 | 422 |
| 422 int ServerBoundCertService::GetDomainBoundCert( | 423 int ServerBoundCertService::GetDomainBoundCert( |
| 423 const std::string& host, | 424 const std::string& host, |
| 424 const std::vector<uint8>& requested_types, | 425 const std::vector<uint8>& requested_types, |
| 425 SSLClientCertType* type, | 426 SSLClientCertType* type, |
| 426 std::string* private_key, | 427 std::string* private_key, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 | 642 |
| 642 job->HandleResult(error, type, private_key, cert); | 643 job->HandleResult(error, type, private_key, cert); |
| 643 delete job; | 644 delete job; |
| 644 } | 645 } |
| 645 | 646 |
| 646 int ServerBoundCertService::cert_count() { | 647 int ServerBoundCertService::cert_count() { |
| 647 return server_bound_cert_store_->GetCertCount(); | 648 return server_bound_cert_store_->GetCertCount(); |
| 648 } | 649 } |
| 649 | 650 |
| 650 } // namespace net | 651 } // namespace net |
| OLD | NEW |