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

Side by Side Diff: net/cert/x509_util_nss.cc

Issue 169193002: Convert scoped_ptr_malloc -> scoped_ptr, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/cert/x509_certificate_win.cc ('k') | net/dns/address_sorter_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/cert/x509_util.h" 5 #include "net/cert/x509_util.h"
6 #include "net/cert/x509_util_nss.h" 6 #include "net/cert/x509_util_nss.h"
7 7
8 #include <cert.h> // Must be included before certdb.h 8 #include <cert.h> // Must be included before certdb.h
9 #include <certdb.h> 9 #include <certdb.h>
10 #include <cryptohi.h> 10 #include <cryptohi.h>
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 X509Certificate::OSCertHandle handle = 207 X509Certificate::OSCertHandle handle =
208 X509Certificate::CreateOSCertHandleFromBytes( 208 X509Certificate::CreateOSCertHandleFromBytes(
209 reinterpret_cast<char*>(certs[i]->data), certs[i]->len); 209 reinterpret_cast<char*>(certs[i]->data), certs[i]->len);
210 if (handle) 210 if (handle)
211 results->push_back(handle); 211 results->push_back(handle);
212 } 212 }
213 213
214 return SECSuccess; 214 return SECSuccess;
215 } 215 }
216 216
217 typedef scoped_ptr_malloc< 217 typedef scoped_ptr<
218 CERTName, 218 CERTName,
219 crypto::NSSDestroyer<CERTName, CERT_DestroyName> > ScopedCERTName; 219 crypto::NSSDestroyer<CERTName, CERT_DestroyName> > ScopedCERTName;
220 220
221 // Create a new CERTName object from its encoded representation. 221 // Create a new CERTName object from its encoded representation.
222 // |arena| is the allocation pool to use. 222 // |arena| is the allocation pool to use.
223 // |data| points to a DER-encoded X.509 DistinguishedName. 223 // |data| points to a DER-encoded X.509 DistinguishedName.
224 // Return a new CERTName pointer on success, or NULL. 224 // Return a new CERTName pointer on success, or NULL.
225 CERTName* CreateCertNameFromEncoded(PLArenaPool* arena, 225 CERTName* CreateCertNameFromEncoded(PLArenaPool* arena,
226 const base::StringPiece& data) { 226 const base::StringPiece& data) {
227 if (!arena) 227 if (!arena)
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 } 629 }
630 630
631 return new_name; 631 return new_name;
632 } 632 }
633 633
634 #endif // defined(USE_NSS) || defined(OS_IOS) 634 #endif // defined(USE_NSS) || defined(OS_IOS)
635 635
636 } // namespace x509_util 636 } // namespace x509_util
637 637
638 } // namespace net 638 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate_win.cc ('k') | net/dns/address_sorter_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698