Index: net/cert/nss_cert_database_unittest.cc |
diff --git a/net/cert/nss_cert_database_unittest.cc b/net/cert/nss_cert_database_unittest.cc |
index 3c83d0562a1b48ab1d2eed2a4043f1c2273023d6..64b06b516255d83ce7f85b593bb90e65f5758020 100644 |
--- a/net/cert/nss_cert_database_unittest.cc |
+++ b/net/cert/nss_cert_database_unittest.cc |
@@ -556,12 +556,9 @@ TEST_F(CertDatabaseNSSTest, DISABLED_ImportServerCert) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(goog_cert.get(), |
- "www.google.com", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(goog_cert.get(), "www.google.com", std::string(), |
+ flags, NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(OK, error); |
EXPECT_EQ(0U, verify_result.cert_status); |
} |
@@ -587,12 +584,9 @@ TEST_F(CertDatabaseNSSTest, ImportServerCert_SelfSigned) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(puny_cert.get(), |
- "xn--wgv71a119e.com", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(puny_cert.get(), "xn--wgv71a119e.com", std::string(), |
+ flags, NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, error); |
EXPECT_EQ(CERT_STATUS_AUTHORITY_INVALID, verify_result.cert_status); |
} |
@@ -619,12 +613,9 @@ TEST_F(CertDatabaseNSSTest, ImportServerCert_SelfSigned_Trusted) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(puny_cert.get(), |
- "xn--wgv71a119e.com", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(puny_cert.get(), "xn--wgv71a119e.com", std::string(), |
+ flags, NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(OK, error); |
EXPECT_EQ(0U, verify_result.cert_status); |
} |
@@ -655,12 +646,9 @@ TEST_F(CertDatabaseNSSTest, ImportCaAndServerCert) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(OK, error); |
EXPECT_EQ(0U, verify_result.cert_status); |
} |
@@ -697,12 +685,9 @@ TEST_F(CertDatabaseNSSTest, ImportCaAndServerCert_DistrustServer) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(ERR_CERT_REVOKED, error); |
EXPECT_EQ(CERT_STATUS_REVOKED, verify_result.cert_status); |
} |
@@ -745,12 +730,9 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(OK, error); |
EXPECT_EQ(0U, verify_result.cert_status); |
@@ -776,12 +758,8 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa) { |
// Server cert should fail to verify. |
CertVerifyResult verify_result2; |
- error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result2); |
+ error = verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result2); |
EXPECT_EQ(ERR_CERT_REVOKED, error); |
EXPECT_EQ(CERT_STATUS_REVOKED, verify_result2.cert_status); |
} |
@@ -821,12 +799,9 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa2) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(OK, error); |
EXPECT_EQ(0U, verify_result.cert_status); |
@@ -836,12 +811,8 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa2) { |
// Server cert should fail to verify. |
CertVerifyResult verify_result2; |
- error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result2); |
+ error = verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result2); |
EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, error); |
EXPECT_EQ(CERT_STATUS_AUTHORITY_INVALID, verify_result2.cert_status); |
} |
@@ -891,12 +862,9 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa3) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(OK, error); |
EXPECT_EQ(0U, verify_result.cert_status); |
@@ -906,12 +874,8 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa3) { |
// Server cert should fail to verify. |
CertVerifyResult verify_result2; |
- error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result2); |
+ error = verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result2); |
EXPECT_EQ(ERR_CERT_AUTHORITY_INVALID, error); |
EXPECT_EQ(CERT_STATUS_AUTHORITY_INVALID, verify_result2.cert_status); |
} |
@@ -955,12 +919,9 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa4) { |
scoped_refptr<CertVerifyProc> verify_proc(new CertVerifyProcNSS()); |
int flags = 0; |
CertVerifyResult verify_result; |
- int error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result); |
+ int error = |
+ verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result); |
EXPECT_EQ(ERR_CERT_REVOKED, error); |
EXPECT_EQ(CERT_STATUS_REVOKED, verify_result.cert_status); |
@@ -970,12 +931,8 @@ TEST_F(CertDatabaseNSSTest, TrustIntermediateCa4) { |
// Server cert should verify. |
CertVerifyResult verify_result2; |
- error = verify_proc->Verify(certs[0].get(), |
- "127.0.0.1", |
- flags, |
- NULL, |
- empty_cert_list_, |
- &verify_result2); |
+ error = verify_proc->Verify(certs[0].get(), "127.0.0.1", std::string(), flags, |
+ NULL, empty_cert_list_, &verify_result2); |
EXPECT_EQ(OK, error); |
EXPECT_EQ(0U, verify_result2.cert_status); |
} |