| Index: net/spdy/spdy_http_stream_spdy3_unittest.cc
|
| diff --git a/net/spdy/spdy_http_stream_spdy3_unittest.cc b/net/spdy/spdy_http_stream_spdy3_unittest.cc
|
| index 8df1b24cecfbff215b5b8da86ae0accea4c7f5f8..3c1d0670bbb5bf9e6febd9264f9894442214b8e5 100644
|
| --- a/net/spdy/spdy_http_stream_spdy3_unittest.cc
|
| +++ b/net/spdy/spdy_http_stream_spdy3_unittest.cc
|
| @@ -63,7 +63,7 @@ class SpdyHttpStreamSpdy3Test : public testing::Test {
|
| }
|
|
|
| void TestSendCredentials(
|
| - OriginBoundCertService* obc_service,
|
| + ServerBoundCertService* server_bound_cert_service,
|
| const std::string& cert,
|
| const std::string& proof,
|
| SSLClientCertType type);
|
| @@ -244,20 +244,20 @@ TEST_F(SpdyHttpStreamSpdy3Test, SpdyURLTest) {
|
|
|
| namespace {
|
|
|
| -void GetECOriginBoundCertAndProof(const std::string& origin,
|
| - OriginBoundCertService* obc_service,
|
| - std::string* cert,
|
| - std::string* proof) {
|
| +void GetECServerBoundCertAndProof(
|
| + const std::string& origin,
|
| + ServerBoundCertService* server_bound_cert_service,
|
| + std::string* cert,
|
| + std::string* proof) {
|
| TestCompletionCallback callback;
|
| std::vector<uint8> requested_cert_types;
|
| requested_cert_types.push_back(CLIENT_CERT_ECDSA_SIGN);
|
| SSLClientCertType cert_type;
|
| std::string key;
|
| - OriginBoundCertService::RequestHandle request_handle;
|
| - int rv = obc_service->GetOriginBoundCert(origin, requested_cert_types,
|
| - &cert_type, &key, cert,
|
| - callback.callback(),
|
| - &request_handle);
|
| + ServerBoundCertService::RequestHandle request_handle;
|
| + int rv = server_bound_cert_service->GetDomainBoundCert(
|
| + origin, requested_cert_types, &cert_type, &key, cert, callback.callback(),
|
| + &request_handle);
|
| EXPECT_EQ(ERR_IO_PENDING, rv);
|
| EXPECT_EQ(OK, callback.WaitForResult());
|
| EXPECT_EQ(CLIENT_CERT_ECDSA_SIGN, cert_type);
|
| @@ -276,7 +276,7 @@ void GetECOriginBoundCertAndProof(const std::string& origin,
|
| std::vector<uint8> proof_data;
|
| scoped_ptr<crypto::ECPrivateKey> private_key(
|
| crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
|
| - OriginBoundCertService::kEPKIPassword, key_data, spki));
|
| + ServerBoundCertService::kEPKIPassword, key_data, spki));
|
| scoped_ptr<crypto::ECSignatureCreator> creator(
|
| crypto::ECSignatureCreator::Create(private_key.get()));
|
| creator->Sign(secret, arraysize(secret), &proof_data);
|
| @@ -285,14 +285,14 @@ void GetECOriginBoundCertAndProof(const std::string& origin,
|
|
|
| } // namespace
|
|
|
| -// TODO(rch): When openssl supports origin bound certifictes, this
|
| +// TODO(rch): When openssl supports server bound certifictes, this
|
| // guard can be removed
|
| #if !defined(USE_OPENSSL)
|
| // Test that if we request a resource for a new origin on a session that
|
| -// used origin bound certificates, that we send a CREDENTIAL frame for
|
| -// the new origin before we send the new request.
|
| +// used domain bound certificates, that we send a CREDENTIAL frame for
|
| +// the new domain before we send the new request.
|
| void SpdyHttpStreamSpdy3Test::TestSendCredentials(
|
| - OriginBoundCertService* obc_service,
|
| + ServerBoundCertService* server_bound_cert_service,
|
| const std::string& cert,
|
| const std::string& proof,
|
| SSLClientCertType type) {
|
| @@ -331,8 +331,8 @@ void SpdyHttpStreamSpdy3Test::TestSendCredentials(
|
| writes, arraysize(writes)));
|
| socket_factory->AddSocketDataProvider(data.get());
|
| SSLSocketDataProvider ssl(SYNCHRONOUS, OK);
|
| - ssl.origin_bound_cert_type = type;
|
| - ssl.origin_bound_cert_service = obc_service;
|
| + ssl.domain_bound_cert_type = type;
|
| + ssl.server_bound_cert_service = server_bound_cert_service;
|
| ssl.protocol_negotiated = SSLClientSocket::kProtoSPDY3;
|
| socket_factory->AddSSLSocketDataProvider(&ssl);
|
| http_session_ = SpdySessionDependencies::SpdyCreateSessionDeterministic(
|
| @@ -455,14 +455,16 @@ TEST_F(SpdyHttpStreamSpdy3Test, SendCredentialsEC) {
|
| crypto::ECSignatureCreator::SetFactoryForTesting(
|
| ec_signature_creator_factory.get());
|
|
|
| - scoped_ptr<OriginBoundCertService> obc_service(
|
| - new OriginBoundCertService(new DefaultOriginBoundCertStore(NULL)));
|
| + scoped_ptr<ServerBoundCertService> server_bound_cert_service(
|
| + new ServerBoundCertService(new DefaultServerBoundCertStore(NULL)));
|
| std::string cert;
|
| std::string proof;
|
| - GetECOriginBoundCertAndProof("http://www.gmail.com/", obc_service.get(),
|
| + GetECServerBoundCertAndProof("http://www.gmail.com/",
|
| + server_bound_cert_service.get(),
|
| &cert, &proof);
|
|
|
| - TestSendCredentials(obc_service.get(), cert, proof, CLIENT_CERT_ECDSA_SIGN);
|
| + TestSendCredentials(server_bound_cert_service.get(), cert, proof,
|
| + CLIENT_CERT_ECDSA_SIGN);
|
| }
|
|
|
| #endif // !defined(USE_OPENSSL)
|
|
|