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

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

Issue 10928107: Support x509 certificate on iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix windows compilation Created 8 years, 3 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/base/x509_certificate_unittest.cc ('k') | net/base/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
(Empty)
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
3 // found in the LICENSE file.
4
5 // This file contains functions for iOS to glue NSS and Security.framework
6 // together.
7
8 #ifndef NET_BASE_X509_UTIL_IOS_H_
9 #define NET_BASE_X509_UTIL_IOS_H_
10
11 #include <Security/Security.h>
12
13 // Forward declaration; real one in <cert.h>
14 typedef struct CERTCertificateStr CERTCertificate;
15
16 namespace net {
17 namespace x509_util_ios {
18
19 // Converts a Security.framework certificate handle (SecCertificateRef) into
20 // an NSS certificate handle (CERTCertificate*).
21 CERTCertificate* CreateNSSCertHandleFromOSHandle(SecCertificateRef cert_handle);
22
23 // Converts an NSS certificate handle (CERTCertificate*) into a
24 // Security.framework handle (SecCertificateRef)
25 SecCertificateRef CreateOSCertHandleFromNSSHandle(
26 CERTCertificate* nss_cert_handle);
27
28 // This is a wrapper class around the native NSS certificate handle.
29 // The constructor copies the certificate data from |cert_handle| and
30 // uses the NSS library to parse it.
31 class NSSCertificate {
32 public:
33 explicit NSSCertificate(SecCertificateRef cert_handle);
34 ~NSSCertificate();
35 CERTCertificate* cert_handle();
36 private:
37 CERTCertificate* nss_cert_handle_;
38 };
39
40 } // namespace x509_util_ios
41 } // namespace net
42
43 #endif // NET_BASE_X509_UTIL_IOS_H_
OLDNEW
« no previous file with comments | « net/base/x509_certificate_unittest.cc ('k') | net/base/x509_util_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698