OLD | NEW |
---|---|
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_BASE_X509_UTIL_NSS_H_ | 5 #ifndef NET_BASE_X509_UTIL_NSS_H_ |
6 #define NET_BASE_X509_UTIL_NSS_H_ | 6 #define NET_BASE_X509_UTIL_NSS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 // certificate handle. Returns an invalid handle, NULL, on failure. | 63 // certificate handle. Returns an invalid handle, NULL, on failure. |
64 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle( | 64 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle( |
65 PickleIterator* pickle_iter); | 65 PickleIterator* pickle_iter); |
66 | 66 |
67 // Sets |*size_bits| to be the length of the public key in bits, and sets | 67 // Sets |*size_bits| to be the length of the public key in bits, and sets |
68 // |*type| to one of the |PublicKeyType| values. In case of | 68 // |*type| to one of the |PublicKeyType| values. In case of |
69 // |kPublicKeyTypeUnknown|, |*size_bits| will be set to 0. | 69 // |kPublicKeyTypeUnknown|, |*size_bits| will be set to 0. |
70 void GetPublicKeyInfo(CERTCertificate* handle, | 70 void GetPublicKeyInfo(CERTCertificate* handle, |
71 size_t* size_bits, | 71 size_t* size_bits, |
72 X509Certificate::PublicKeyType* type); | 72 X509Certificate::PublicKeyType* type); |
73 | |
74 // Returns true if |name| is listed in |valid_issuers| | |
75 // |name| is a SECItem corresponding to a DER-encoded X.509 | |
76 // DistinguishedName. | |
77 // |valid_issuers| is a list of strings, where each string contains also | |
78 // a DER-encoded X.509 DN. | |
79 bool IsCertNameItemInIssuerList( | |
80 SECItem* name, | |
Ryan Sleevi
2012/12/13 19:49:05
see comments in iOS about making this a CERTName a
| |
81 const std::vector<std::string>& valid_issuers); | |
Ryan Sleevi
2012/12/13 19:49:05
Perhaps rather then passing a single SECItem for a
digit1
2012/12/14 17:54:33
Yes, I've actually changed the function to take a
Ryan Sleevi
2012/12/14 18:16:42
That works too
| |
82 | |
73 #endif // defined(USE_NSS) || defined(OS_IOS) | 83 #endif // defined(USE_NSS) || defined(OS_IOS) |
74 | 84 |
75 } // namespace x509_util | 85 } // namespace x509_util |
76 | 86 |
77 } // namespace net | 87 } // namespace net |
78 | 88 |
79 #endif // NET_BASE_X509_UTIL_NSS_H_ | 89 #endif // NET_BASE_X509_UTIL_NSS_H_ |
OLD | NEW |