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

Unified Diff: net/cert/nss_cert_database_unittest.cc

Issue 1081913003: Route OCSP stapling through CertVerifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boringnss
Patch Set: yet another CrOS-only Verify call Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/multi_threaded_cert_verifier_unittest.cc ('k') | net/cert/single_request_cert_verifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « net/cert/multi_threaded_cert_verifier_unittest.cc ('k') | net/cert/single_request_cert_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698