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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 is_system_time_valid_ = x509_util::IsSupportedValidityRange(start, end); | 403 is_system_time_valid_ = x509_util::IsSupportedValidityRange(start, end); |
404 } | 404 } |
405 | 405 |
406 ServerBoundCertService::~ServerBoundCertService() { | 406 ServerBoundCertService::~ServerBoundCertService() { |
407 STLDeleteValues(&inflight_); | 407 STLDeleteValues(&inflight_); |
408 } | 408 } |
409 | 409 |
410 //static | 410 //static |
411 std::string ServerBoundCertService::GetDomainForHost(const std::string& host) { | 411 std::string ServerBoundCertService::GetDomainForHost(const std::string& host) { |
412 std::string domain = | 412 std::string domain = |
413 RegistryControlledDomainService::GetDomainAndRegistry(host); | 413 RegistryControlledDomainService::GetDomainAndRegistry( |
| 414 host, RCDS::EXCLUDE_PRIVATE_REGISTRIES); |
414 if (domain.empty()) | 415 if (domain.empty()) |
415 return host; | 416 return host; |
416 return domain; | 417 return domain; |
417 } | 418 } |
418 | 419 |
419 int ServerBoundCertService::GetDomainBoundCert( | 420 int ServerBoundCertService::GetDomainBoundCert( |
420 const std::string& origin, | 421 const std::string& origin, |
421 const std::vector<uint8>& requested_types, | 422 const std::vector<uint8>& requested_types, |
422 SSLClientCertType* type, | 423 SSLClientCertType* type, |
423 std::string* private_key, | 424 std::string* private_key, |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 641 |
641 job->HandleResult(error, type, private_key, cert); | 642 job->HandleResult(error, type, private_key, cert); |
642 delete job; | 643 delete job; |
643 } | 644 } |
644 | 645 |
645 int ServerBoundCertService::cert_count() { | 646 int ServerBoundCertService::cert_count() { |
646 return server_bound_cert_store_->GetCertCount(); | 647 return server_bound_cert_store_->GetCertCount(); |
647 } | 648 } |
648 | 649 |
649 } // namespace net | 650 } // namespace net |
OLD | NEW |