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

Unified Diff: remoting/host/token_validator_base.cc

Issue 2838243002: Remove client_certs from SSLCertRequestInfo. (Closed)
Patch Set: revert stray whitespace change Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/token_validator_base.h ('k') | remoting/host/token_validator_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/token_validator_base.cc
diff --git a/remoting/host/token_validator_base.cc b/remoting/host/token_validator_base.cc
index 42cafe195d29152d6c03e41f93d1f493650cd9de..41aeec5516df4e4600d98822bba95d29fa1fb77b 100644
--- a/remoting/host/token_validator_base.cc
+++ b/remoting/host/token_validator_base.cc
@@ -199,31 +199,29 @@ void TokenValidatorBase::OnCertificateRequested(
// OpenSSL does not use the ClientCertStore infrastructure.
client_cert_store = nullptr;
#endif
- // The callback is uncancellable, and GetClientCert requires selected_certs
- // and client_cert_store to stay alive until the callback is called. So we
- // must give it a WeakPtr for |this|, and ownership of the other parameters.
- net::CertificateList* selected_certs(new net::CertificateList());
+ // The callback is uncancellable, and GetClientCert requires
+ // client_cert_store to stay alive until the callback is called. So we must
+ // give it a WeakPtr for |this|, and ownership of the other parameters.
client_cert_store->GetClientCerts(
- *cert_request_info, selected_certs,
+ *cert_request_info,
base::Bind(&TokenValidatorBase::OnCertificatesSelected,
- weak_factory_.GetWeakPtr(), base::Owned(selected_certs),
- base::Owned(client_cert_store)));
+ weak_factory_.GetWeakPtr(), base::Owned(client_cert_store)));
}
void TokenValidatorBase::OnCertificatesSelected(
- net::CertificateList* selected_certs,
- net::ClientCertStore* unused) {
+ net::ClientCertStore* unused,
+ net::CertificateList selected_certs) {
const std::string& issuer =
third_party_auth_config_.token_validation_cert_issuer;
base::Time now = base::Time::Now();
auto best_match_position =
- std::max_element(selected_certs->begin(), selected_certs->end(),
+ std::max_element(selected_certs.begin(), selected_certs.end(),
std::bind(&WorseThan, issuer, now, std::placeholders::_1,
std::placeholders::_2));
- if (best_match_position == selected_certs->end() ||
+ if (best_match_position == selected_certs.end() ||
!IsCertificateValid(issuer, now, *best_match_position)) {
ContinueWithCertificate(nullptr, nullptr);
} else {
« no previous file with comments | « remoting/host/token_validator_base.h ('k') | remoting/host/token_validator_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698