summaryrefslogtreecommitdiffstats
path: root/chromium/ppapi/proxy/tcp_socket_resource_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ppapi/proxy/tcp_socket_resource_base.cc')
-rw-r--r--chromium/ppapi/proxy/tcp_socket_resource_base.cc31
1 files changed, 6 insertions, 25 deletions
diff --git a/chromium/ppapi/proxy/tcp_socket_resource_base.cc b/chromium/ppapi/proxy/tcp_socket_resource_base.cc
index fff2da3cf8a..39c9fa311d6 100644
--- a/chromium/ppapi/proxy/tcp_socket_resource_base.cc
+++ b/chromium/ppapi/proxy/tcp_socket_resource_base.cc
@@ -189,32 +189,13 @@ PP_Resource TCPSocketResourceBase::GetServerCertificateImpl() {
PP_Bool TCPSocketResourceBase::AddChainBuildingCertificateImpl(
PP_Resource certificate,
PP_Bool trusted) {
- // TODO(raymes): The plumbing for this functionality is implemented but the
- // certificates aren't yet used for the connection, so just return false for
- // now.
+ // TODO(raymes): This is exposed in the private PPB_TCPSocket_Private
+ // interface for Flash but isn't currently implemented due to security
+ // implications. It is exposed so that it can be hooked up on the Flash side
+ // and if we decide to implement it we can do so without modifying the Flash
+ // codebase.
+ NOTIMPLEMENTED();
return PP_FALSE;
-
- thunk::EnterResourceNoLock<thunk::PPB_X509Certificate_Private_API>
- enter_cert(certificate, true);
- if (enter_cert.failed())
- return PP_FALSE;
-
- PP_Var der_var = enter_cert.object()->GetField(
- PP_X509CERTIFICATE_PRIVATE_RAW);
- ArrayBufferVar* der_array_buffer = ArrayBufferVar::FromPPVar(der_var);
- PP_Bool success = PP_FALSE;
- if (der_array_buffer) {
- const char* der_bytes = static_cast<const char*>(der_array_buffer->Map());
- uint32_t der_length = der_array_buffer->ByteLength();
- std::vector<char> der(der_bytes, der_bytes + der_length);
- if (PP_ToBool(trusted))
- trusted_certificates_.push_back(der);
- else
- untrusted_certificates_.push_back(der);
- success = PP_TRUE;
- }
- PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(der_var);
- return success;
}
int32_t TCPSocketResourceBase::ReadImpl(