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

Unified Diff: remoting/host/token_validator_base_unittest.cc

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: rebase on https://codereview.chromium.org/2899083006/ Created 3 years, 7 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 | « remoting/host/token_validator_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/token_validator_base_unittest.cc
diff --git a/remoting/host/token_validator_base_unittest.cc b/remoting/host/token_validator_base_unittest.cc
index 4404771e2c851838acbe5dca265e3b913d2bd884..3d2a1a536ee3250c696372404c1a10bc0690b36b 100644
--- a/remoting/host/token_validator_base_unittest.cc
+++ b/remoting/host/token_validator_base_unittest.cc
@@ -9,6 +9,7 @@
#include "base/atomic_sequence_num.h"
#include "crypto/rsa_private_key.h"
#include "net/cert/x509_util.h"
+#include "net/ssl/client_cert_identity_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -44,8 +45,9 @@ class TestTokenValidator : TokenValidatorBase {
void ExpectContinueWithCertificate(net::X509Certificate* client_cert);
protected:
- void ContinueWithCertificate(net::X509Certificate* client_cert,
- net::SSLPrivateKey* client_private_key) override;
+ void ContinueWithCertificate(
+ scoped_refptr<net::X509Certificate> client_cert,
+ scoped_refptr<net::SSLPrivateKey> client_private_key) override;
private:
void StartValidateRequest(const std::string& token) override {}
@@ -61,7 +63,9 @@ TestTokenValidator::~TestTokenValidator() {}
void TestTokenValidator::SelectCertificates(
net::CertificateList selected_certs) {
- OnCertificatesSelected(nullptr, std::move(selected_certs));
+ OnCertificatesSelected(
+ nullptr,
+ net::FakeClientCertIdentityListFromCertificateList(selected_certs));
}
void TestTokenValidator::ExpectContinueWithCertificate(
@@ -70,9 +74,10 @@ void TestTokenValidator::ExpectContinueWithCertificate(
}
void TestTokenValidator::ContinueWithCertificate(
- net::X509Certificate* client_cert,
- net::SSLPrivateKey* client_private_key) {
- EXPECT_EQ(expected_client_cert_, client_cert);
+ scoped_refptr<net::X509Certificate> client_cert,
+ scoped_refptr<net::SSLPrivateKey> client_private_key) {
+ // XXX test private key
+ EXPECT_EQ(expected_client_cert_, client_cert.get());
}
class TokenValidatorBaseTest : public testing::Test {
« no previous file with comments | « remoting/host/token_validator_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698