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 9b026cc472734355527e491987faa80b2cb495da..7c97f11bab2fa31681654cd288b67397c53a29fc 100644 |
--- a/net/cert/nss_cert_database_unittest.cc |
+++ b/net/cert/nss_cert_database_unittest.cc |
@@ -554,12 +554,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); |
} |
@@ -585,12 +582,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); |
} |
@@ -617,12 +611,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); |
} |
@@ -653,12 +644,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); |
} |
@@ -695,12 +683,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); |
} |
@@ -743,12 +728,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); |
@@ -774,12 +756,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); |
} |
@@ -819,12 +797,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); |
@@ -834,12 +809,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); |
} |
@@ -889,12 +860,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); |
@@ -904,12 +872,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); |
} |
@@ -953,12 +917,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); |
@@ -968,12 +929,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); |
} |