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_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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 static SHA1Fingerprint CalculateFingerprint(OSCertHandle cert_handle); | 444 static SHA1Fingerprint CalculateFingerprint(OSCertHandle cert_handle); |
445 | 445 |
446 // Calculates the SHA-1 fingerprint of the intermediate CA certificates. | 446 // Calculates the SHA-1 fingerprint of the intermediate CA certificates. |
447 // Returns an empty (all zero) fingerprint on failure. | 447 // Returns an empty (all zero) fingerprint on failure. |
448 static SHA1Fingerprint CalculateCAFingerprint( | 448 static SHA1Fingerprint CalculateCAFingerprint( |
449 const OSCertHandles& intermediates); | 449 const OSCertHandles& intermediates); |
450 | 450 |
451 private: | 451 private: |
452 friend class base::RefCountedThreadSafe<X509Certificate>; | 452 friend class base::RefCountedThreadSafe<X509Certificate>; |
453 friend class TestRootCerts; // For unit tests | 453 friend class TestRootCerts; // For unit tests |
454 // TODO(rsleevi): Temporary refactoring - http://crbug.com/114343 | |
455 friend class X509CertificateTest; | |
456 friend class CertVerifyProcMac; | 454 friend class CertVerifyProcMac; |
457 friend class CertVerifyProcNSS; | 455 friend class CertVerifyProcNSS; |
458 friend class CertVerifyProcOpenSSL; | 456 friend class CertVerifyProcOpenSSL; |
459 friend class CertVerifyProcWin; | 457 friend class CertVerifyProcWin; |
460 | 458 |
461 FRIEND_TEST_ALL_PREFIXES(X509CertificateNameVerifyTest, VerifyHostname); | 459 FRIEND_TEST_ALL_PREFIXES(X509CertificateNameVerifyTest, VerifyHostname); |
462 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, DigiNotarCerts); | 460 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, DigiNotarCerts); |
463 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers); | 461 FRIEND_TEST_ALL_PREFIXES(X509CertificateTest, SerialNumbers); |
464 | 462 |
465 // Construct an X509Certificate from a handle to the certificate object | 463 // Construct an X509Certificate from a handle to the certificate object |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 // (Marked mutable because it's used in a const method.) | 606 // (Marked mutable because it's used in a const method.) |
609 mutable base::Lock verification_lock_; | 607 mutable base::Lock verification_lock_; |
610 #endif | 608 #endif |
611 | 609 |
612 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 610 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
613 }; | 611 }; |
614 | 612 |
615 } // namespace net | 613 } // namespace net |
616 | 614 |
617 #endif // NET_BASE_X509_CERTIFICATE_H_ | 615 #endif // NET_BASE_X509_CERTIFICATE_H_ |
OLD | NEW |