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(const Pickle& pickle, | 182 static X509Certificate* CreateFromPickle(PickleIterator* pickle_iter, |
183 PickleIterator* pickle_iter, | |
184 PickleType type); | 183 PickleType type); |
185 | 184 |
186 // Parses all of the certificates possible from |data|. |format| is a | 185 // Parses all of the certificates possible from |data|. |format| is a |
187 // bit-wise OR of Format, indicating the possible formats the | 186 // bit-wise OR of Format, indicating the possible formats the |
188 // certificates may have been serialized as. If an error occurs, an empty | 187 // certificates may have been serialized as. If an error occurs, an empty |
189 // collection will be returned. | 188 // collection will be returned. |
190 static CertificateList CreateCertificateListFromBytes(const char* data, | 189 static CertificateList CreateCertificateListFromBytes(const char* data, |
191 int length, | 190 int length, |
192 int format); | 191 int format); |
193 | 192 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 // based on the type of the certificate. | 515 // based on the type of the certificate. |
517 std::string default_nickname_; | 516 std::string default_nickname_; |
518 #endif | 517 #endif |
519 | 518 |
520 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 519 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
521 }; | 520 }; |
522 | 521 |
523 } // namespace net | 522 } // namespace net |
524 | 523 |
525 #endif // NET_CERT_X509_CERTIFICATE_H_ | 524 #endif // NET_CERT_X509_CERTIFICATE_H_ |
OLD | NEW |