OLD | NEW |
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 #ifndef NET_CERT_X509_CERTIFICATE_H_ | 5 #ifndef NET_CERT_X509_CERTIFICATE_H_ |
6 #define NET_CERT_X509_CERTIFICATE_H_ | 6 #define NET_CERT_X509_CERTIFICATE_H_ |
7 | 7 |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // then this will return the nickname specified upon creation. | 172 // then this will return the nickname specified upon creation. |
173 std::string GetDefaultNickname(CertType type) const; | 173 std::string GetDefaultNickname(CertType type) const; |
174 #endif | 174 #endif |
175 | 175 |
176 // Create an X509Certificate from the representation stored in the given | 176 // Create an X509Certificate from the representation stored in the given |
177 // pickle. The data for this object is found relative to the given | 177 // pickle. The data for this object is found relative to the given |
178 // pickle_iter, which should be passed to the pickle's various Read* methods. | 178 // pickle_iter, which should be passed to the pickle's various Read* methods. |
179 // Returns NULL on failure. | 179 // Returns NULL on failure. |
180 // | 180 // |
181 // The returned pointer must be stored in a scoped_refptr<X509Certificate>. | 181 // The returned pointer must be stored in a scoped_refptr<X509Certificate>. |
182 static X509Certificate* CreateFromPickle(PickleIterator* pickle_iter, | 182 static X509Certificate* CreateFromPickle(const Pickle& pickle, |
| 183 PickleIterator* pickle_iter, |
183 PickleType type); | 184 PickleType type); |
184 | 185 |
185 // Parses all of the certificates possible from |data|. |format| is a | 186 // Parses all of the certificates possible from |data|. |format| is a |
186 // bit-wise OR of Format, indicating the possible formats the | 187 // bit-wise OR of Format, indicating the possible formats the |
187 // certificates may have been serialized as. If an error occurs, an empty | 188 // certificates may have been serialized as. If an error occurs, an empty |
188 // collection will be returned. | 189 // collection will be returned. |
189 static CertificateList CreateCertificateListFromBytes(const char* data, | 190 static CertificateList CreateCertificateListFromBytes(const char* data, |
190 int length, | 191 int length, |
191 int format); | 192 int format); |
192 | 193 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 // based on the type of the certificate. | 516 // based on the type of the certificate. |
516 std::string default_nickname_; | 517 std::string default_nickname_; |
517 #endif | 518 #endif |
518 | 519 |
519 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 520 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
520 }; | 521 }; |
521 | 522 |
522 } // namespace net | 523 } // namespace net |
523 | 524 |
524 #endif // NET_CERT_X509_CERTIFICATE_H_ | 525 #endif // NET_CERT_X509_CERTIFICATE_H_ |
OLD | NEW |