| 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 #include <cert.h> | 5 #include <cert.h> |
| 6 #include <pk11pub.h> | 6 #include <pk11pub.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "base/memory/scoped_temp_dir.h" | |
| 14 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/scoped_temp_dir.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "crypto/nss_util.h" | 17 #include "crypto/nss_util.h" |
| 18 #include "crypto/nss_util_internal.h" | 18 #include "crypto/nss_util_internal.h" |
| 19 #include "crypto/scoped_nss_types.h" | 19 #include "crypto/scoped_nss_types.h" |
| 20 #include "net/base/cert_database.h" | 20 #include "net/base/cert_database.h" |
| 21 #include "net/base/cert_status_flags.h" | 21 #include "net/base/cert_status_flags.h" |
| 22 #include "net/base/cert_verify_result.h" | 22 #include "net/base/cert_verify_result.h" |
| 23 #include "net/base/crypto_module.h" | 23 #include "net/base/crypto_module.h" |
| 24 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
| 25 #include "net/base/x509_certificate.h" | 25 #include "net/base/x509_certificate.h" |
| 26 #include "net/third_party/mozilla_security_manager/nsNSSCertTrust.h" |
| 26 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" | 27 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" |
| 27 #include "net/third_party/mozilla_security_manager/nsNSSCertTrust.h" | |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 | 29 |
| 30 namespace psm = mozilla_security_manager; | 30 namespace psm = mozilla_security_manager; |
| 31 | 31 |
| 32 namespace net { | 32 namespace net { |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 // Returns a FilePath object representing the src/net/data/ssl/certificates | 36 // Returns a FilePath object representing the src/net/data/ssl/certificates |
| 37 // directory in the source tree. | 37 // directory in the source tree. |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 puny_cert.get(), CA_CERT, | 496 puny_cert.get(), CA_CERT, |
| 497 CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL)); | 497 CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL)); |
| 498 | 498 |
| 499 verify_result.Reset(); | 499 verify_result.Reset(); |
| 500 error = puny_cert->Verify("xn--wgv71a119e.com", flags, &verify_result); | 500 error = puny_cert->Verify("xn--wgv71a119e.com", flags, &verify_result); |
| 501 EXPECT_EQ(OK, error); | 501 EXPECT_EQ(OK, error); |
| 502 EXPECT_EQ(0, verify_result.cert_status); | 502 EXPECT_EQ(0, verify_result.cert_status); |
| 503 } | 503 } |
| 504 | 504 |
| 505 } // namespace net | 505 } // namespace net |
| OLD | NEW |