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 #include "net/cert/nss_cert_database.h" | 5 #include "net/cert/nss_cert_database.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <certdb.h> | 8 #include <certdb.h> |
9 #include <keyhi.h> | 9 #include <keyhi.h> |
10 #include <pk11pub.h> | 10 #include <pk11pub.h> |
11 #include <secmod.h> | 11 #include <secmod.h> |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
17 #include "base/callback.h" | 17 #include "base/callback.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/observer_list_threadsafe.h" | 20 #include "base/observer_list_threadsafe.h" |
21 #include "base/task_runner.h" | 21 #include "base/task_runner.h" |
22 #include "base/task_runner_util.h" | 22 #include "base/task_runner_util.h" |
23 #include "base/threading/worker_pool.h" | 23 #include "base/threading/worker_pool.h" |
24 #include "crypto/scoped_nss_types.h" | 24 #include "crypto/scoped_nss_types.h" |
25 #include "net/base/crypto_module.h" | |
26 #include "net/base/net_errors.h" | 25 #include "net/base/net_errors.h" |
27 #include "net/cert/cert_database.h" | 26 #include "net/cert/cert_database.h" |
28 #include "net/cert/x509_certificate.h" | 27 #include "net/cert/x509_certificate.h" |
29 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" | 28 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" |
30 #include "net/third_party/mozilla_security_manager/nsPKCS12Blob.h" | 29 #include "net/third_party/mozilla_security_manager/nsPKCS12Blob.h" |
31 | 30 |
32 // In NSS 3.13, CERTDB_VALID_PEER was renamed CERTDB_TERMINAL_RECORD. So we use | 31 // In NSS 3.13, CERTDB_VALID_PEER was renamed CERTDB_TERMINAL_RECORD. So we use |
33 // the new name of the macro. | 32 // the new name of the macro. |
34 #if !defined(CERTDB_TERMINAL_RECORD) | 33 #if !defined(CERTDB_TERMINAL_RECORD) |
35 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER | 34 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 } else { | 462 } else { |
464 if (SEC_DeletePermCertificate(cert->os_cert_handle())) { | 463 if (SEC_DeletePermCertificate(cert->os_cert_handle())) { |
465 LOG(ERROR) << "SEC_DeletePermCertificate failed: " << PORT_GetError(); | 464 LOG(ERROR) << "SEC_DeletePermCertificate failed: " << PORT_GetError(); |
466 return false; | 465 return false; |
467 } | 466 } |
468 } | 467 } |
469 return true; | 468 return true; |
470 } | 469 } |
471 | 470 |
472 } // namespace net | 471 } // namespace net |
OLD | NEW |