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 "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
9 #include "base/sha1.h" | 9 #include "base/sha1.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 scoped_refptr<X509Certificate> root_cert = | 661 scoped_refptr<X509Certificate> root_cert = |
662 ImportCertFromFile(certs_dir, "2048-rsa-root.pem"); | 662 ImportCertFromFile(certs_dir, "2048-rsa-root.pem"); |
663 ASSERT_NE(static_cast<X509Certificate*>(NULL), root_cert); | 663 ASSERT_NE(static_cast<X509Certificate*>(NULL), root_cert); |
664 TestRootCerts::GetInstance()->Add(root_cert.get()); | 664 TestRootCerts::GetInstance()->Add(root_cert.get()); |
665 | 665 |
666 // Now test each chain. | 666 // Now test each chain. |
667 for (Strings::const_iterator ee_type = key_types.begin(); | 667 for (Strings::const_iterator ee_type = key_types.begin(); |
668 ee_type != key_types.end(); ++ee_type) { | 668 ee_type != key_types.end(); ++ee_type) { |
669 for (Strings::const_iterator signer_type = key_types.begin(); | 669 for (Strings::const_iterator signer_type = key_types.begin(); |
670 signer_type != key_types.end(); ++signer_type) { | 670 signer_type != key_types.end(); ++signer_type) { |
| 671 #if defined(OS_ANDROID) |
| 672 // Due to a limitation of the javax.net.ssl.TrustManager API, we can't |
| 673 // test for strong leaf + weak intermediate right now. TODO(palmer, |
| 674 // joth): Re-enable this test (delete this #if block) when possible. |
| 675 // This is bug 109783. |
| 676 if (IsWeakKeyType(*signer_type)) |
| 677 continue; |
| 678 #endif |
| 679 |
671 std::string basename = *ee_type + "-ee-by-" + *signer_type + | 680 std::string basename = *ee_type + "-ee-by-" + *signer_type + |
672 "-intermediate.pem"; | 681 "-intermediate.pem"; |
673 scoped_refptr<X509Certificate> ee_cert = | 682 scoped_refptr<X509Certificate> ee_cert = |
674 ImportCertFromFile(certs_dir, basename); | 683 ImportCertFromFile(certs_dir, basename); |
675 ASSERT_NE(static_cast<X509Certificate*>(NULL), ee_cert); | 684 ASSERT_NE(static_cast<X509Certificate*>(NULL), ee_cert); |
676 | 685 |
677 basename = *signer_type + "-intermediate.pem"; | 686 basename = *signer_type + "-intermediate.pem"; |
678 scoped_refptr<X509Certificate> intermediate = | 687 scoped_refptr<X509Certificate> intermediate = |
679 ImportCertFromFile(certs_dir, basename); | 688 ImportCertFromFile(certs_dir, basename); |
680 ASSERT_NE(static_cast<X509Certificate*>(NULL), intermediate); | 689 ASSERT_NE(static_cast<X509Certificate*>(NULL), intermediate); |
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 #define MAYBE_VerifyMixed DISABLED_VerifyMixed | 1986 #define MAYBE_VerifyMixed DISABLED_VerifyMixed |
1978 #else | 1987 #else |
1979 #define MAYBE_VerifyMixed VerifyMixed | 1988 #define MAYBE_VerifyMixed VerifyMixed |
1980 #endif | 1989 #endif |
1981 WRAPPED_INSTANTIATE_TEST_CASE_P( | 1990 WRAPPED_INSTANTIATE_TEST_CASE_P( |
1982 MAYBE_VerifyMixed, | 1991 MAYBE_VerifyMixed, |
1983 X509CertificateWeakDigestTest, | 1992 X509CertificateWeakDigestTest, |
1984 testing::ValuesIn(kVerifyMixedTestData)); | 1993 testing::ValuesIn(kVerifyMixedTestData)); |
1985 | 1994 |
1986 } // namespace net | 1995 } // namespace net |
OLD | NEW |