OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
16 #include "base/string_piece.h" | 16 #include "base/string_piece.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
18 #include "net/base/x509_cert_types.h" | 18 #include "net/base/x509_cert_types.h" |
19 | 19 |
20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
21 #include <windows.h> | 21 #include <windows.h> |
22 #include <wincrypt.h> | 22 #include <wincrypt.h> |
23 #elif defined(OS_MACOSX) | 23 #elif defined(OS_MACOSX) |
24 #include <CoreFoundation/CFArray.h> | 24 #include <CoreFoundation/CFArray.h> |
25 #include <Security/SecBase.h> | 25 #include <Security/SecBase.h> |
26 | 26 |
27 #include "base/lock.h" | 27 #include "base/synchronization/lock.h" |
28 #elif defined(USE_OPENSSL) | 28 #elif defined(USE_OPENSSL) |
29 // Forward declaration; real one in <x509.h> | 29 // Forward declaration; real one in <x509.h> |
30 struct x509_st; | 30 struct x509_st; |
31 typedef struct x509_store_st X509_STORE; | 31 typedef struct x509_store_st X509_STORE; |
32 #elif defined(USE_NSS) | 32 #elif defined(USE_NSS) |
33 // Forward declaration; real one in <cert.h> | 33 // Forward declaration; real one in <cert.h> |
34 struct CERTCertificateStr; | 34 struct CERTCertificateStr; |
35 #endif | 35 #endif |
36 | 36 |
37 class Pickle; | 37 class Pickle; |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // A handle to the certificate object in the underlying crypto library. | 363 // A handle to the certificate object in the underlying crypto library. |
364 OSCertHandle cert_handle_; | 364 OSCertHandle cert_handle_; |
365 | 365 |
366 // Untrusted intermediate certificates associated with this certificate | 366 // Untrusted intermediate certificates associated with this certificate |
367 // that may be needed for chain building. | 367 // that may be needed for chain building. |
368 OSCertHandles intermediate_ca_certs_; | 368 OSCertHandles intermediate_ca_certs_; |
369 | 369 |
370 #if defined(OS_MACOSX) | 370 #if defined(OS_MACOSX) |
371 // Blocks multiple threads from verifying the cert simultaneously. | 371 // Blocks multiple threads from verifying the cert simultaneously. |
372 // (Marked mutable because it's used in a const method.) | 372 // (Marked mutable because it's used in a const method.) |
373 mutable Lock verification_lock_; | 373 mutable base::Lock verification_lock_; |
374 #endif | 374 #endif |
375 | 375 |
376 // Where the certificate comes from. | 376 // Where the certificate comes from. |
377 Source source_; | 377 Source source_; |
378 | 378 |
379 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 379 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
380 }; | 380 }; |
381 | 381 |
382 } // namespace net | 382 } // namespace net |
383 | 383 |
384 #endif // NET_BASE_X509_CERTIFICATE_H_ | 384 #endif // NET_BASE_X509_CERTIFICATE_H_ |
OLD | NEW |