Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: net/cert/x509_certificate_unittest.cc

Issue 1490233005: net: Fix CertVerifyProcTest.LargeKey for OSX 10.11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another test. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/data/ssl/certificates/large_key.pem » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/x509_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 X509Certificate::kPublicKeyTypeRSA}, 1168 X509Certificate::kPublicKeyTypeRSA},
1169 {"prime256v1-ecdsa-ee-by-1024-rsa-intermediate.pem", 1169 {"prime256v1-ecdsa-ee-by-1024-rsa-intermediate.pem",
1170 256, 1170 256,
1171 X509Certificate::kPublicKeyTypeECDSA}, 1171 X509Certificate::kPublicKeyTypeECDSA},
1172 #if defined(OS_MACOSX) && !defined(OS_IOS) 1172 #if defined(OS_MACOSX) && !defined(OS_IOS)
1173 // OS X has an key length limit of 4096 bits. This should manifest as an 1173 // OS X has an key length limit of 4096 bits. This should manifest as an
1174 // unknown key. If a future version of OS X changes this, large_key.pem may 1174 // unknown key. If a future version of OS X changes this, large_key.pem may
1175 // need to be renegerated with a larger key. See https://crbug.com/472291. 1175 // need to be renegerated with a larger key. See https://crbug.com/472291.
1176 {"large_key.pem", 0, X509Certificate::kPublicKeyTypeUnknown}, 1176 {"large_key.pem", 0, X509Certificate::kPublicKeyTypeUnknown},
1177 #else 1177 #else
1178 {"large_key.pem", 4104, X509Certificate::kPublicKeyTypeRSA}, 1178 {"large_key.pem", 8200, X509Certificate::kPublicKeyTypeRSA},
1179 #endif 1179 #endif
1180 }; 1180 };
1181 1181
1182 class X509CertificatePublicKeyInfoTest 1182 class X509CertificatePublicKeyInfoTest
1183 : public testing::TestWithParam<PublicKeyInfoTestData> { 1183 : public testing::TestWithParam<PublicKeyInfoTestData> {
1184 }; 1184 };
1185 1185
1186 TEST_P(X509CertificatePublicKeyInfoTest, GetPublicKeyInfo) { 1186 TEST_P(X509CertificatePublicKeyInfoTest, GetPublicKeyInfo) {
1187 PublicKeyInfoTestData data = GetParam(); 1187 PublicKeyInfoTestData data = GetParam();
1188 1188
(...skipping 17 matching lines...) Expand all
1206 &actual_type); 1206 &actual_type);
1207 1207
1208 EXPECT_EQ(data.expected_bits, actual_bits); 1208 EXPECT_EQ(data.expected_bits, actual_bits);
1209 EXPECT_EQ(data.expected_type, actual_type); 1209 EXPECT_EQ(data.expected_type, actual_type);
1210 } 1210 }
1211 1211
1212 INSTANTIATE_TEST_CASE_P(, X509CertificatePublicKeyInfoTest, 1212 INSTANTIATE_TEST_CASE_P(, X509CertificatePublicKeyInfoTest,
1213 testing::ValuesIn(kPublicKeyInfoTestData)); 1213 testing::ValuesIn(kPublicKeyInfoTestData));
1214 1214
1215 } // namespace net 1215 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/data/ssl/certificates/large_key.pem » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698