summaryrefslogtreecommitdiffstats
path: root/net/base/x509_certificate_mac.cc
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 18:44:05 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 18:44:05 +0000
commit1c8857bce13d0fb7a7ee8f12c154a2392afe00a2 (patch)
tree3a4262dee2b95c95c909da3323208274190f11bd /net/base/x509_certificate_mac.cc
parent6f7a602151b8a9c4437f9756766782d8b0f8196f (diff)
downloadchromium_src-1c8857bce13d0fb7a7ee8f12c154a2392afe00a2.zip
chromium_src-1c8857bce13d0fb7a7ee8f12c154a2392afe00a2.tar.gz
chromium_src-1c8857bce13d0fb7a7ee8f12c154a2392afe00a2.tar.bz2
Make X509Certificate::CreateFromHandle() copy the OSCertHandle, rather than assume ownership
R=wtc BUG=47463 TEST=none Review URL: http://codereview.chromium.org/2867026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate_mac.cc')
-rw-r--r--net/base/x509_certificate_mac.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
index 25e2104..8d7970a 100644
--- a/net/base/x509_certificate_mac.cc
+++ b/net/base/x509_certificate_mac.cc
@@ -735,7 +735,6 @@ bool X509Certificate::IsIssuedBy(
for (int i = 0; i < n; ++i) {
SecCertificateRef cert_handle = reinterpret_cast<SecCertificateRef>(
const_cast<void*>(CFArrayGetValueAtIndex(cert_chain, i)));
- CFRetain(cert_handle);
scoped_refptr<X509Certificate> cert = X509Certificate::CreateFromHandle(
cert_handle,
X509Certificate::SOURCE_LONE_CERT_IMPORT,
@@ -795,6 +794,7 @@ bool X509Certificate::GetSSLClientCertificates (
err = SecIdentityCopyCertificate(identity, &cert_handle);
if (err != noErr)
continue;
+ scoped_cftyperef<SecCertificateRef> scoped_cert_handle(cert_handle);
scoped_refptr<X509Certificate> cert(
CreateFromHandle(cert_handle, SOURCE_LONE_CERT_IMPORT,