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

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

Issue 1553903002: Regenerate the test certificates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WildcardCert
Patch Set: Rebase Created 4 years, 11 months 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
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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 static const uint8_t kIPv6Address[] = { 497 static const uint8_t kIPv6Address[] = {
498 0xFE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 498 0xFE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
500 }; 500 };
501 ASSERT_EQ(arraysize(kIPv6Address), ip_addresses[1].size()); 501 ASSERT_EQ(arraysize(kIPv6Address), ip_addresses[1].size());
502 EXPECT_EQ(0, memcmp(ip_addresses[1].data(), kIPv6Address, 502 EXPECT_EQ(0, memcmp(ip_addresses[1].data(), kIPv6Address,
503 arraysize(kIPv6Address))); 503 arraysize(kIPv6Address)));
504 504
505 // Ensure the subjectAltName dirName has not influenced the handling of 505 // Ensure the subjectAltName dirName has not influenced the handling of
506 // the subject commonName. 506 // the subject commonName.
507 EXPECT_EQ("127.0.0.1", san_cert->subject().common_name); 507 EXPECT_EQ("localhost", san_cert->subject().common_name);
Ryan Hamilton 2016/01/04 18:34:06 If you look at the cert in question, it appears to
508 } 508 }
509 509
510 TEST(X509CertificateTest, ExtractSPKIFromDERCert) { 510 TEST(X509CertificateTest, ExtractSPKIFromDERCert) {
511 base::FilePath certs_dir = GetTestCertsDirectory(); 511 base::FilePath certs_dir = GetTestCertsDirectory();
512 scoped_refptr<X509Certificate> cert = 512 scoped_refptr<X509Certificate> cert =
513 ImportCertFromFile(certs_dir, "nist.der"); 513 ImportCertFromFile(certs_dir, "nist.der");
514 ASSERT_NE(static_cast<X509Certificate*>(NULL), cert.get()); 514 ASSERT_NE(static_cast<X509Certificate*>(NULL), cert.get());
515 515
516 std::string derBytes; 516 std::string derBytes;
517 EXPECT_TRUE(X509Certificate::GetDEREncoded(cert->os_cert_handle(), 517 EXPECT_TRUE(X509Certificate::GetDEREncoded(cert->os_cert_handle(),
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | « net/cert/cert_verify_proc_whitelist_unittest.cc ('k') | net/data/ssl/certificates/10_year_validity.pem » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698