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

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

Issue 1149113006: Move Pickle to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/cert/x509_certificate.h ('k') | net/disk_cache/simple/simple_index.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_NSS_H_ 5 #ifndef NET_CERT_X509_UTIL_NSS_H_
6 #define NET_CERT_X509_UTIL_NSS_H_ 6 #define NET_CERT_X509_UTIL_NSS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
13 #include "net/cert/x509_certificate.h" 13 #include "net/cert/x509_certificate.h"
14 14
15 namespace base {
15 class PickleIterator; 16 class PickleIterator;
17 }
16 18
17 typedef struct CERTCertificateStr CERTCertificate; 19 typedef struct CERTCertificateStr CERTCertificate;
18 typedef struct CERTNameStr CERTName; 20 typedef struct CERTNameStr CERTName;
19 typedef struct PK11SlotInfoStr PK11SlotInfo; 21 typedef struct PK11SlotInfoStr PK11SlotInfo;
20 typedef struct PLArenaPool PLArenaPool; 22 typedef struct PLArenaPool PLArenaPool;
21 typedef struct SECItemStr SECItem; 23 typedef struct SECItemStr SECItem;
22 24
23 namespace net { 25 namespace net {
24 26
25 namespace x509_util { 27 namespace x509_util {
(...skipping 18 matching lines...) Expand all
44 // Creates all possible OS certificate handles from |data| encoded in a specific 46 // Creates all possible OS certificate handles from |data| encoded in a specific
45 // |format|. Returns an empty collection on failure. 47 // |format|. Returns an empty collection on failure.
46 X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes( 48 X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes(
47 const char* data, 49 const char* data,
48 int length, 50 int length,
49 X509Certificate::Format format); 51 X509Certificate::Format format);
50 52
51 // Reads a single certificate from |pickle_iter| and returns a platform-specific 53 // Reads a single certificate from |pickle_iter| and returns a platform-specific
52 // certificate handle. Returns an invalid handle, NULL, on failure. 54 // certificate handle. Returns an invalid handle, NULL, on failure.
53 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle( 55 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle(
54 PickleIterator* pickle_iter); 56 base::PickleIterator* pickle_iter);
55 57
56 // Sets |*size_bits| to be the length of the public key in bits, and sets 58 // Sets |*size_bits| to be the length of the public key in bits, and sets
57 // |*type| to one of the |PublicKeyType| values. In case of 59 // |*type| to one of the |PublicKeyType| values. In case of
58 // |kPublicKeyTypeUnknown|, |*size_bits| will be set to 0. 60 // |kPublicKeyTypeUnknown|, |*size_bits| will be set to 0.
59 void GetPublicKeyInfo(CERTCertificate* handle, 61 void GetPublicKeyInfo(CERTCertificate* handle,
60 size_t* size_bits, 62 size_t* size_bits,
61 X509Certificate::PublicKeyType* type); 63 X509Certificate::PublicKeyType* type);
62 64
63 // Create a list of CERTName objects from a list of DER-encoded X.509 65 // Create a list of CERTName objects from a list of DER-encoded X.509
64 // DistinguishedName items. All objects are created in a given arena. 66 // DistinguishedName items. All objects are created in a given arena.
(...skipping 25 matching lines...) Expand all
90 std::string GetUniqueNicknameForSlot(const std::string& nickname, 92 std::string GetUniqueNicknameForSlot(const std::string& nickname,
91 const SECItem* subject, 93 const SECItem* subject,
92 PK11SlotInfo* slot); 94 PK11SlotInfo* slot);
93 #endif // defined(USE_NSS_CERTS) || defined(OS_IOS) 95 #endif // defined(USE_NSS_CERTS) || defined(OS_IOS)
94 96
95 } // namespace x509_util 97 } // namespace x509_util
96 98
97 } // namespace net 99 } // namespace net
98 100
99 #endif // NET_CERT_X509_UTIL_NSS_H_ 101 #endif // NET_CERT_X509_UTIL_NSS_H_
OLDNEW
« no previous file with comments | « net/cert/x509_certificate.h ('k') | net/disk_cache/simple/simple_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698