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

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

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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/test_root_certs_mac.cc ('k') | net/cert/x509_certificate_mac.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_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <CommonCrypto/CommonDigest.h> 7 #include <CommonCrypto/CommonDigest.h>
8 #include <Security/Security.h> 8 #include <Security/Security.h>
9 9
10 #include <cert.h> 10 #include <cert.h>
(...skipping 18 matching lines...) Expand all
29 #include "crypto/nss_util.h" 29 #include "crypto/nss_util.h"
30 #include "crypto/scoped_nss_types.h" 30 #include "crypto/scoped_nss_types.h"
31 #include "net/base/net_errors.h" 31 #include "net/base/net_errors.h"
32 #include "net/cert/asn1_util.h" 32 #include "net/cert/asn1_util.h"
33 #include "net/cert/cert_status_flags.h" 33 #include "net/cert/cert_status_flags.h"
34 #include "net/cert/cert_verify_result.h" 34 #include "net/cert/cert_verify_result.h"
35 #include "net/cert/ev_root_ca_metadata.h" 35 #include "net/cert/ev_root_ca_metadata.h"
36 #include "net/cert/x509_util_ios.h" 36 #include "net/cert/x509_util_ios.h"
37 #include "net/cert/x509_util_nss.h" 37 #include "net/cert/x509_util_nss.h"
38 38
39 using base::mac::ScopedCFTypeRef; 39 using base::ScopedCFTypeRef;
40 40
41 namespace net { 41 namespace net {
42 namespace { 42 namespace {
43 // Returns true if a given |cert_handle| is actually a valid X.509 certificate 43 // Returns true if a given |cert_handle| is actually a valid X.509 certificate
44 // handle. 44 // handle.
45 // 45 //
46 // SecCertificateCreateFromData() does not always force the immediate parsing of 46 // SecCertificateCreateFromData() does not always force the immediate parsing of
47 // the certificate, and as such, may return a SecCertificateRef for an 47 // the certificate, and as such, may return a SecCertificateRef for an
48 // invalid/unparsable certificate. Force parsing to occur to ensure that the 48 // invalid/unparsable certificate. Force parsing to occur to ensure that the
49 // SecCertificateRef is correct. On later versions where 49 // SecCertificateRef is correct. On later versions where
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 // static 238 // static
239 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle, 239 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
240 size_t* size_bits, 240 size_t* size_bits,
241 PublicKeyType* type) { 241 PublicKeyType* type) {
242 x509_util_ios::NSSCertificate nss_cert(cert_handle); 242 x509_util_ios::NSSCertificate nss_cert(cert_handle);
243 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type); 243 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type);
244 } 244 }
245 245
246 } // namespace net 246 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/test_root_certs_mac.cc ('k') | net/cert/x509_certificate_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698