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

Unified Diff: net/ssl/client_cert_store_unittest-inl.h

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: removed no longer needed forward declaration Created 3 years, 6 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/ssl/client_cert_store_nss_unittest.cc ('k') | net/ssl/client_cert_store_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/client_cert_store_unittest-inl.h
diff --git a/net/ssl/client_cert_store_unittest-inl.h b/net/ssl/client_cert_store_unittest-inl.h
index df561f3b9abffe71a1d5919d38d923f3b81690d4..ca877a393bb6de28b33ee9221090a53de400ff08 100644
--- a/net/ssl/client_cert_store_unittest-inl.h
+++ b/net/ssl/client_cert_store_unittest-inl.h
@@ -52,7 +52,7 @@ const unsigned char kAuthorityRootDN[] = {
// the platform implementation should implement this method:
// bool SelectClientCerts(const CertificateList& input_certs,
// const SSLCertRequestInfo& cert_request_info,
-// CertificateList* selected_certs);
+// ClientCertIdentityList* selected_identities);
template <typename T>
class ClientCertStoreTest : public ::testing::Test {
public:
@@ -62,14 +62,14 @@ class ClientCertStoreTest : public ::testing::Test {
TYPED_TEST_CASE_P(ClientCertStoreTest);
TYPED_TEST_P(ClientCertStoreTest, EmptyQuery) {
- std::vector<scoped_refptr<X509Certificate> > certs;
+ CertificateList certs;
scoped_refptr<SSLCertRequestInfo> request(new SSLCertRequestInfo());
- std::vector<scoped_refptr<X509Certificate> > selected_certs;
- bool rv = this->delegate_.SelectClientCerts(
- certs, *request.get(), &selected_certs);
+ ClientCertIdentityList selected_identities;
+ bool rv = this->delegate_.SelectClientCerts(certs, *request.get(),
+ &selected_identities);
EXPECT_TRUE(rv);
- EXPECT_EQ(0u, selected_certs.size());
+ EXPECT_EQ(0u, selected_identities.size());
}
// Verify that CertRequestInfo with empty |cert_authorities| matches all
@@ -83,12 +83,12 @@ TYPED_TEST_P(ClientCertStoreTest, AllIssuersAllowed) {
certs.push_back(cert);
scoped_refptr<SSLCertRequestInfo> request(new SSLCertRequestInfo());
- std::vector<scoped_refptr<X509Certificate> > selected_certs;
- bool rv = this->delegate_.SelectClientCerts(
- certs, *request.get(), &selected_certs);
+ ClientCertIdentityList selected_identities;
+ bool rv = this->delegate_.SelectClientCerts(certs, *request.get(),
+ &selected_identities);
EXPECT_TRUE(rv);
- ASSERT_EQ(1u, selected_certs.size());
- EXPECT_TRUE(selected_certs[0]->Equals(cert.get()));
+ ASSERT_EQ(1u, selected_identities.size());
+ EXPECT_TRUE(selected_identities[0]->certificate()->Equals(cert.get()));
}
// Verify that certificates are correctly filtered against CertRequestInfo with
@@ -119,12 +119,12 @@ TYPED_TEST_P(ClientCertStoreTest, DISABLED_CertAuthorityFiltering) {
scoped_refptr<SSLCertRequestInfo> request(new SSLCertRequestInfo());
request->cert_authorities = authority_1;
- std::vector<scoped_refptr<X509Certificate> > selected_certs;
- bool rv = this->delegate_.SelectClientCerts(
- certs, *request.get(), &selected_certs);
+ ClientCertIdentityList selected_identities;
+ bool rv = this->delegate_.SelectClientCerts(certs, *request.get(),
+ &selected_identities);
EXPECT_TRUE(rv);
- ASSERT_EQ(1u, selected_certs.size());
- EXPECT_TRUE(selected_certs[0]->Equals(cert_1.get()));
+ ASSERT_EQ(1u, selected_identities.size());
+ EXPECT_TRUE(selected_identities[0]->certificate()->Equals(cert_1.get()));
}
REGISTER_TYPED_TEST_CASE_P(ClientCertStoreTest,
« no previous file with comments | « net/ssl/client_cert_store_nss_unittest.cc ('k') | net/ssl/client_cert_store_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698