| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 PICKLETYPE_CERTIFICATE_CHAIN_V2, | 120 PICKLETYPE_CERTIFICATE_CHAIN_V2, |
| 121 | 121 |
| 122 // The Pickle contains the certificate and any certificates that were | 122 // The Pickle contains the certificate and any certificates that were |
| 123 // stored in |intermediate_ca_certs_| at the time it was serialized. | 123 // stored in |intermediate_ca_certs_| at the time it was serialized. |
| 124 // The format is [int count], [data - this certificate], | 124 // The format is [int count], [data - this certificate], |
| 125 // [data - intermediate1], ... [data - intermediateN]. | 125 // [data - intermediate1], ... [data - intermediateN]. |
| 126 // All certificates are stored in DER form. | 126 // All certificates are stored in DER form. |
| 127 PICKLETYPE_CERTIFICATE_CHAIN_V3, | 127 PICKLETYPE_CERTIFICATE_CHAIN_V3, |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 // Creates a X509Certificate from the ground up. Used by tests that simulate | |
| 131 // SSL connections. | |
| 132 X509Certificate(const std::string& subject, const std::string& issuer, | |
| 133 base::Time start_date, base::Time expiration_date); | |
| 134 | |
| 135 // Create an X509Certificate from a handle to the certificate object in the | 130 // Create an X509Certificate from a handle to the certificate object in the |
| 136 // underlying crypto library. | 131 // underlying crypto library. |
| 137 static scoped_refptr<X509Certificate> CreateFromHandle( | 132 static scoped_refptr<X509Certificate> CreateFromHandle( |
| 138 OSCertHandle cert_handle, | 133 OSCertHandle cert_handle, |
| 139 const OSCertHandles& intermediates); | 134 const OSCertHandles& intermediates); |
| 140 | 135 |
| 141 // Create an X509Certificate from a chain of DER encoded certificates. The | 136 // Create an X509Certificate from a chain of DER encoded certificates. The |
| 142 // first certificate in the chain is the end-entity certificate to which a | 137 // first certificate in the chain is the end-entity certificate to which a |
| 143 // handle is returned. The other certificates in the chain are intermediate | 138 // handle is returned. The other certificates in the chain are intermediate |
| 144 // certificates. | 139 // certificates. |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 // based on the type of the certificate. | 469 // based on the type of the certificate. |
| 475 std::string default_nickname_; | 470 std::string default_nickname_; |
| 476 #endif | 471 #endif |
| 477 | 472 |
| 478 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 473 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 479 }; | 474 }; |
| 480 | 475 |
| 481 } // namespace net | 476 } // namespace net |
| 482 | 477 |
| 483 #endif // NET_CERT_X509_CERTIFICATE_H_ | 478 #endif // NET_CERT_X509_CERTIFICATE_H_ |
| OLD | NEW |