| 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_CERTIFICATE_H_ | 5 #ifndef NET_BASE_X509_CERTIFICATE_H_ |
| 6 #define NET_BASE_X509_CERTIFICATE_H_ | 6 #define NET_BASE_X509_CERTIFICATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // Calculates the SHA-1 fingerprint of the certificate. Returns an empty | 371 // Calculates the SHA-1 fingerprint of the certificate. Returns an empty |
| 372 // (all zero) fingerprint on failure. | 372 // (all zero) fingerprint on failure. |
| 373 static SHA1Fingerprint CalculateFingerprint(OSCertHandle cert_handle); | 373 static SHA1Fingerprint CalculateFingerprint(OSCertHandle cert_handle); |
| 374 | 374 |
| 375 private: | 375 private: |
| 376 friend class base::RefCountedThreadSafe<X509Certificate>; | 376 friend class base::RefCountedThreadSafe<X509Certificate>; |
| 377 friend class TestRootCerts; // For unit tests | 377 friend class TestRootCerts; // For unit tests |
| 378 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, Cache); | 378 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, Cache); |
| 379 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, IntermediateCertificates); | 379 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, IntermediateCertificates); |
| 380 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers); | 380 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers); |
| 381 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, DigiNotarCerts); |
| 381 FRIEND_TEST_ALL_PREFIXES(X509CertificateNameVerifyTest, VerifyHostname); | 382 FRIEND_TEST_ALL_PREFIXES(X509CertificateNameVerifyTest, VerifyHostname); |
| 382 | 383 |
| 383 // Construct an X509Certificate from a handle to the certificate object | 384 // Construct an X509Certificate from a handle to the certificate object |
| 384 // in the underlying crypto library. | 385 // in the underlying crypto library. |
| 385 X509Certificate(OSCertHandle cert_handle, | 386 X509Certificate(OSCertHandle cert_handle, |
| 386 const OSCertHandles& intermediates); | 387 const OSCertHandles& intermediates); |
| 387 | 388 |
| 388 ~X509Certificate(); | 389 ~X509Certificate(); |
| 389 | 390 |
| 390 // Common object initialization code. Called by the constructors only. | 391 // Common object initialization code. Called by the constructors only. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 // (Marked mutable because it's used in a const method.) | 493 // (Marked mutable because it's used in a const method.) |
| 493 mutable base::Lock verification_lock_; | 494 mutable base::Lock verification_lock_; |
| 494 #endif | 495 #endif |
| 495 | 496 |
| 496 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 497 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 497 }; | 498 }; |
| 498 | 499 |
| 499 } // namespace net | 500 } // namespace net |
| 500 | 501 |
| 501 #endif // NET_BASE_X509_CERTIFICATE_H_ | 502 #endif // NET_BASE_X509_CERTIFICATE_H_ |
| OLD | NEW |