OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/crypto/scoped_nss_types.h" | 10 #include "base/crypto/scoped_nss_types.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/nss_util.h" | 13 #include "base/nss_util.h" |
14 #include "base/nss_util_internal.h" | 14 #include "base/nss_util_internal.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/scoped_temp_dir.h" | 16 #include "base/scoped_temp_dir.h" |
| 17 #include "base/singleton.h" |
17 #include "base/string_util.h" | 18 #include "base/string_util.h" |
18 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
19 #include "net/base/cert_database.h" | 20 #include "net/base/cert_database.h" |
20 #include "net/base/cert_status_flags.h" | 21 #include "net/base/cert_status_flags.h" |
21 #include "net/base/cert_verify_result.h" | 22 #include "net/base/cert_verify_result.h" |
22 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
23 #include "net/base/x509_certificate.h" | 24 #include "net/base/x509_certificate.h" |
24 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" | 25 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" |
25 #include "net/third_party/mozilla_security_manager/nsNSSCertTrust.h" | 26 #include "net/third_party/mozilla_security_manager/nsNSSCertTrust.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 puny_cert.get(), CA_CERT, | 493 puny_cert.get(), CA_CERT, |
493 CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL)); | 494 CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL)); |
494 | 495 |
495 verify_result.Reset(); | 496 verify_result.Reset(); |
496 error = puny_cert->Verify("xn--wgv71a119e.com", flags, &verify_result); | 497 error = puny_cert->Verify("xn--wgv71a119e.com", flags, &verify_result); |
497 EXPECT_EQ(OK, error); | 498 EXPECT_EQ(OK, error); |
498 EXPECT_EQ(0, verify_result.cert_status); | 499 EXPECT_EQ(0, verify_result.cert_status); |
499 } | 500 } |
500 | 501 |
501 } // namespace net | 502 } // namespace net |
OLD | NEW |