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

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: Removed unnecessary bits 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
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..4afe307c24d66630098d56f3d80ba4490c29dfef 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 {
@@ -1149,7 +1147,6 @@ bool X509Certificate::IsIssuedBy(
const_cast<void*>(CFArrayGetValueAtIndex(cert_chain, i)));
scoped_refptr<X509Certificate> cert(X509Certificate::CreateFromHandle(
cert_handle,
- X509Certificate::SOURCE_LONE_CERT_IMPORT,
X509Certificate::OSCertHandles()));
wtc 2011/07/17 01:55:32 Move this to the previous line.
for (unsigned j = 0; j < valid_issuers.size(); j++) {
if (cert->issuer().Matches(valid_issuers[j]))
@@ -1290,8 +1287,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;

Powered by Google App Engine
This is Rietveld 408576698