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

Side by Side Diff: net/cert/x509_util_ios.h

Issue 2864133002: Convert iOS to use X509CertificateBytes. (Closed)
Patch Set: static_cast, more unittest Created 3 years, 7 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
« no previous file with comments | « net/cert/x509_certificate_ios.cc ('k') | net/cert/x509_util_ios.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef NET_CERT_X509_UTIL_IOS_H_ 5 #ifndef NET_CERT_X509_UTIL_IOS_H_
6 #define NET_CERT_X509_UTIL_IOS_H_ 6 #define NET_CERT_X509_UTIL_IOS_H_
7 7
8 #include <Security/Security.h> 8 #include <Security/Security.h>
9 9
10 #include <vector>
11
10 #include "base/mac/scoped_cftyperef.h" 12 #include "base/mac/scoped_cftyperef.h"
13 #include "base/memory/ref_counted.h"
11 #include "net/base/net_export.h" 14 #include "net/base/net_export.h"
12 15
13 namespace net { 16 namespace net {
14 17
15 class X509Certificate; 18 class X509Certificate;
16 19
17 namespace x509_util { 20 namespace x509_util {
18 21
22 // Creates a SecCertificate handle from the DER-encoded representation.
23 // Returns NULL on failure.
24 NET_EXPORT base::ScopedCFTypeRef<SecCertificateRef>
25 CreateSecCertificateFromBytes(const uint8_t* data, size_t length);
26
19 // Returns a SecCertificate representing |cert|, or NULL on failure. 27 // Returns a SecCertificate representing |cert|, or NULL on failure.
20 NET_EXPORT base::ScopedCFTypeRef<SecCertificateRef> 28 NET_EXPORT base::ScopedCFTypeRef<SecCertificateRef>
21 CreateSecCertificateFromX509Certificate(const X509Certificate* cert); 29 CreateSecCertificateFromX509Certificate(const X509Certificate* cert);
22 30
31 // Creates an X509Certificate representing |sec_cert| with intermediates
32 // |sec_chain|.
33 NET_EXPORT scoped_refptr<X509Certificate>
34 CreateX509CertificateFromSecCertificate(
35 SecCertificateRef sec_cert,
36 const std::vector<SecCertificateRef>& sec_chain);
37
23 } // namespace x509_util 38 } // namespace x509_util
24 39
25 } // namespace net 40 } // namespace net
26 41
27 #endif // NET_CERT_X509_UTIL_IOS_H_ 42 #endif // NET_CERT_X509_UTIL_IOS_H_
OLDNEW
« no previous file with comments | « net/cert/x509_certificate_ios.cc ('k') | net/cert/x509_util_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698