| 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 <cert.h> | 5 #include <cert.h> |
| 6 #include <certdb.h> | 6 #include <certdb.h> |
| 7 #include <pk11pub.h> | 7 #include <pk11pub.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/string16.h" | 16 #include "base/string16.h" |
| 17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
| 18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
| 19 #include "crypto/nss_util.h" | 19 #include "crypto/nss_util.h" |
| 20 #include "crypto/nss_util_internal.h" | 20 #include "crypto/nss_util_internal.h" |
| 21 #include "crypto/scoped_nss_types.h" | 21 #include "crypto/scoped_nss_types.h" |
| 22 #include "net/base/cert_status_flags.h" | |
| 23 #include "net/base/cert_test_util.h" | |
| 24 #include "net/base/cert_verify_proc_nss.h" | |
| 25 #include "net/base/cert_verify_result.h" | |
| 26 #include "net/base/crypto_module.h" | 22 #include "net/base/crypto_module.h" |
| 27 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
| 28 #include "net/base/nss_cert_database.h" | |
| 29 #include "net/base/test_data_directory.h" | 24 #include "net/base/test_data_directory.h" |
| 30 #include "net/base/x509_certificate.h" | 25 #include "net/cert/cert_status_flags.h" |
| 26 #include "net/cert/cert_verify_proc_nss.h" |
| 27 #include "net/cert/cert_verify_result.h" |
| 28 #include "net/cert/nss_cert_database.h" |
| 29 #include "net/cert/x509_certificate.h" |
| 30 #include "net/test/cert_test_util.h" |
| 31 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" | 31 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" |
| 32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
| 33 | 33 |
| 34 // In NSS 3.13, CERTDB_VALID_PEER was renamed CERTDB_TERMINAL_RECORD. So we use | 34 // In NSS 3.13, CERTDB_VALID_PEER was renamed CERTDB_TERMINAL_RECORD. So we use |
| 35 // the new name of the macro. | 35 // the new name of the macro. |
| 36 #if !defined(CERTDB_TERMINAL_RECORD) | 36 #if !defined(CERTDB_TERMINAL_RECORD) |
| 37 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER | 37 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 namespace net { | 40 namespace net { |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 | 920 |
| 921 // Server cert should verify. | 921 // Server cert should verify. |
| 922 CertVerifyResult verify_result2; | 922 CertVerifyResult verify_result2; |
| 923 error = verify_proc->Verify(certs[0], "127.0.0.1", flags, | 923 error = verify_proc->Verify(certs[0], "127.0.0.1", flags, |
| 924 NULL, empty_cert_list_, &verify_result2); | 924 NULL, empty_cert_list_, &verify_result2); |
| 925 EXPECT_EQ(OK, error); | 925 EXPECT_EQ(OK, error); |
| 926 EXPECT_EQ(0U, verify_result2.cert_status); | 926 EXPECT_EQ(0U, verify_result2.cert_status); |
| 927 } | 927 } |
| 928 | 928 |
| 929 } // namespace net | 929 } // namespace net |
| OLD | NEW |