summaryrefslogtreecommitdiffstats
path: root/net/base/cert_database_nss_unittest.cc
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 02:26:08 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 02:26:08 +0000
commitec2f688a0ea9bb4e4cb17575bc39e16cf5b4bb06 (patch)
tree5dd62305a771e12edade5de239b88255022412ea /net/base/cert_database_nss_unittest.cc
parentc0b0a690853bc8e2d653f1524466750f7bf57188 (diff)
downloadchromium_src-ec2f688a0ea9bb4e4cb17575bc39e16cf5b4bb06.zip
chromium_src-ec2f688a0ea9bb4e4cb17575bc39e16cf5b4bb06.tar.gz
chromium_src-ec2f688a0ea9bb4e4cb17575bc39e16cf5b4bb06.tar.bz2
Revert 69356 - Regenerate the root certificate and end-entity certificates used for various tests in net_unittests, now that Windows can temporarily trust certificates for the duration of tests.
In addition, add unittests for net::TestRootCerts, which depend on the certs being tested not being trusted by the system beforehand. BUG=8470, 5552 TEST=TestRootCertsTest.* Review URL: http://codereview.chromium.org/5535006 TBR=rsleevi@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cert_database_nss_unittest.cc')
-rw-r--r--net/base/cert_database_nss_unittest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/base/cert_database_nss_unittest.cc b/net/base/cert_database_nss_unittest.cc
index cd9f7a9..8e69104 100644
--- a/net/base/cert_database_nss_unittest.cc
+++ b/net/base/cert_database_nss_unittest.cc
@@ -169,7 +169,7 @@ TEST_F(CertDatabaseNSSTest, ImportFromPKCS12AndExportAgain) {
}
TEST_F(CertDatabaseNSSTest, ImportCACert_SSLTrust) {
- std::string cert_data = ReadTestFile("root_ca_cert.pem");
+ std::string cert_data = ReadTestFile("root_ca_cert.crt");
CertificateList certs =
X509Certificate::CreateCertificateListFromBytes(
@@ -187,7 +187,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_SSLTrust) {
CertificateList cert_list = ListCertsInSlot(slot_.get());
ASSERT_EQ(1U, cert_list.size());
scoped_refptr<X509Certificate> cert(cert_list[0]);
- EXPECT_EQ("Test Root CA", cert->subject().common_name);
+ EXPECT_EQ("Test CA", cert->subject().common_name);
EXPECT_EQ(CertDatabase::TRUSTED_SSL,
cert_db_.GetCertTrust(cert.get(), CA_CERT));
@@ -201,7 +201,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_SSLTrust) {
}
TEST_F(CertDatabaseNSSTest, ImportCACert_EmailTrust) {
- std::string cert_data = ReadTestFile("root_ca_cert.pem");
+ std::string cert_data = ReadTestFile("root_ca_cert.crt");
CertificateList certs =
X509Certificate::CreateCertificateListFromBytes(
@@ -219,7 +219,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_EmailTrust) {
CertificateList cert_list = ListCertsInSlot(slot_.get());
ASSERT_EQ(1U, cert_list.size());
scoped_refptr<X509Certificate> cert(cert_list[0]);
- EXPECT_EQ("Test Root CA", cert->subject().common_name);
+ EXPECT_EQ("Test CA", cert->subject().common_name);
EXPECT_EQ(CertDatabase::TRUSTED_EMAIL,
cert_db_.GetCertTrust(cert.get(), CA_CERT));
@@ -232,7 +232,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_EmailTrust) {
}
TEST_F(CertDatabaseNSSTest, ImportCACert_ObjSignTrust) {
- std::string cert_data = ReadTestFile("root_ca_cert.pem");
+ std::string cert_data = ReadTestFile("root_ca_cert.crt");
CertificateList certs =
X509Certificate::CreateCertificateListFromBytes(
@@ -250,7 +250,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_ObjSignTrust) {
CertificateList cert_list = ListCertsInSlot(slot_.get());
ASSERT_EQ(1U, cert_list.size());
scoped_refptr<X509Certificate> cert(cert_list[0]);
- EXPECT_EQ("Test Root CA", cert->subject().common_name);
+ EXPECT_EQ("Test CA", cert->subject().common_name);
EXPECT_EQ(CertDatabase::TRUSTED_OBJ_SIGN,
cert_db_.GetCertTrust(cert.get(), CA_CERT));
@@ -391,7 +391,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyTree) {
}
TEST_F(CertDatabaseNSSTest, ImportCACertNotHierarchy) {
- std::string cert_data = ReadTestFile("root_ca_cert.pem");
+ std::string cert_data = ReadTestFile("root_ca_cert.crt");
CertificateList certs =
X509Certificate::CreateCertificateListFromBytes(
cert_data.data(), cert_data.size(), X509Certificate::FORMAT_AUTO);
@@ -415,7 +415,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertNotHierarchy) {
CertificateList cert_list = ListCertsInSlot(slot_.get());
ASSERT_EQ(1U, cert_list.size());
- EXPECT_EQ("Test Root CA", cert_list[0]->subject().common_name);
+ EXPECT_EQ("Test CA", cert_list[0]->subject().common_name);
}
TEST_F(CertDatabaseNSSTest, ImportServerCert) {