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

Unified Diff: net/base/x509_certificate_mac.cc

Issue 2944008: Refactor X509Certificate caching to cache the OS handle, rather than the X509Certificate (Closed)
Patch Set: Rebase before commit Created 9 years, 5 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 | « net/base/x509_certificate.cc ('k') | net/base/x509_certificate_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate_mac.cc
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
index 8f4ba4e654dbd2a057e0906e2a9e5a1715a84945..1edceddb77106327497002cf351e8d56bafffad6 100644
--- a/net/base/x509_certificate_mac.cc
+++ b/net/base/x509_certificate_mac.cc
@@ -742,9 +742,7 @@ X509Certificate* X509Certificate::CreateSelfSigned(
}
scoped_cert.reset(certificate_ref);
- return CreateFromHandle(
- scoped_cert, X509Certificate::SOURCE_LONE_CERT_IMPORT,
- X509Certificate::OSCertHandles());
+ return CreateFromHandle(scoped_cert, X509Certificate::OSCertHandles());
}
void X509Certificate::GetDNSNames(std::vector<std::string>* dns_names) const {
@@ -1148,9 +1146,7 @@ bool X509Certificate::IsIssuedBy(
SecCertificateRef cert_handle = reinterpret_cast<SecCertificateRef>(
const_cast<void*>(CFArrayGetValueAtIndex(cert_chain, i)));
scoped_refptr<X509Certificate> cert(X509Certificate::CreateFromHandle(
- cert_handle,
- X509Certificate::SOURCE_LONE_CERT_IMPORT,
- X509Certificate::OSCertHandles()));
+ cert_handle, X509Certificate::OSCertHandles()));
for (unsigned j = 0; j < valid_issuers.size(); j++) {
if (cert->issuer().Matches(valid_issuers[j]))
return true;
@@ -1290,8 +1286,7 @@ bool X509Certificate::GetSSLClientCertificates(
ScopedCFTypeRef<SecCertificateRef> scoped_cert_handle(cert_handle);
scoped_refptr<X509Certificate> cert(
- CreateFromHandle(cert_handle, SOURCE_LONE_CERT_IMPORT,
- OSCertHandles()));
+ CreateFromHandle(cert_handle, OSCertHandles()));
if (cert->HasExpired() || !cert->SupportsSSLClientAuth())
continue;
« no previous file with comments | « net/base/x509_certificate.cc ('k') | net/base/x509_certificate_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698