| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers); | 382 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers); |
| 383 | 383 |
| 384 // Construct an X509Certificate from a handle to the certificate object | 384 // Construct an X509Certificate from a handle to the certificate object |
| 385 // in the underlying crypto library. | 385 // in the underlying crypto library. |
| 386 X509Certificate(OSCertHandle cert_handle, | 386 X509Certificate(OSCertHandle cert_handle, |
| 387 const OSCertHandles& intermediates); | 387 const OSCertHandles& intermediates); |
| 388 | 388 |
| 389 ~X509Certificate(); | 389 ~X509Certificate(); |
| 390 | 390 |
| 391 // Common object initialization code. Called by the constructors only. | 391 // Common object initialization code. Called by the constructors only. |
| 392 void Initialize(); | 392 bool Initialize(); |
| 393 | 393 |
| 394 #if defined(USE_OPENSSL_CERTS) | 394 #if defined(USE_OPENSSL_CERTS) |
| 395 // Resets the store returned by cert_store() to default state. Used by | 395 // Resets the store returned by cert_store() to default state. Used by |
| 396 // TestRootCerts to undo modifications. | 396 // TestRootCerts to undo modifications. |
| 397 static void ResetCertStore(); | 397 static void ResetCertStore(); |
| 398 #endif | 398 #endif |
| 399 | 399 |
| 400 // Verifies that |hostname| matches one of the certificate names or IP | 400 // Verifies that |hostname| matches one of the certificate names or IP |
| 401 // addresses supplied, based on TLS name matching rules - specifically, | 401 // addresses supplied, based on TLS name matching rules - specifically, |
| 402 // following http://tools.ietf.org/html/rfc6125. | 402 // following http://tools.ietf.org/html/rfc6125. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 // Untrusted intermediate certificates associated with this certificate | 451 // Untrusted intermediate certificates associated with this certificate |
| 452 // that may be needed for chain building. | 452 // that may be needed for chain building. |
| 453 OSCertHandles intermediate_ca_certs_; | 453 OSCertHandles intermediate_ca_certs_; |
| 454 | 454 |
| 455 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 455 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 456 }; | 456 }; |
| 457 | 457 |
| 458 } // namespace net | 458 } // namespace net |
| 459 | 459 |
| 460 #endif // NET_CERT_X509_CERTIFICATE_H_ | 460 #endif // NET_CERT_X509_CERTIFICATE_H_ |
| OLD | NEW |