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

Unified Diff: content/browser/renderer_host/pepper_tcp_socket.cc

Issue 9405038: Add PPAPI interface for secure sockets in flash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
Index: content/browser/renderer_host/pepper_tcp_socket.cc
diff --git a/content/browser/renderer_host/pepper_tcp_socket.cc b/content/browser/renderer_host/pepper_tcp_socket.cc
index 21b1cefe9061c8190b90de8bb660983dbf85dbf4..1f5e9bc7a5ed2500915cb58367480912253ce4a7 100644
--- a/content/browser/renderer_host/pepper_tcp_socket.cc
+++ b/content/browser/renderer_host/pepper_tcp_socket.cc
@@ -19,11 +19,13 @@
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/base/single_request_host_resolver.h"
+#include "net/base/x509_certificate.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/ssl_client_socket.h"
#include "net/socket/tcp_client_socket.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/shared_impl/private/ppb_flash_x509_certificate_shared.h"
#include "ppapi/shared_impl/private/net_address_private_impl.h"
#include "ppapi/shared_impl/private/tcp_socket_private_impl.h"
@@ -202,6 +204,26 @@ void PepperTCPSocket::SendConnectACKError() {
NetAddressPrivateImpl::kInvalidNetAddress));
}
+// static
+bool PepperTCPSocket::GetCertificateFields(
+ const net::X509Certificate& cert,
+ ppapi::PPB_X509Certificate_Fields* fields) {
+ // TODO(raymes,rsleevi): Implement this.
+ return true;
+}
+
+// static
+bool PepperTCPSocket::GetCertificateFields(
+ const char* bytes,
+ uint32_t length,
+ ppapi::PPB_X509Certificate_Fields* fields) {
+ scoped_refptr<net::X509Certificate> cert =
+ net::X509Certificate::CreateFromBytes(bytes, length);
+ if (!cert.get())
+ return false;
+ return GetCertificateFields(*cert, fields);
+}
+
void PepperTCPSocket::SendReadACKError() {
manager_->Send(new PpapiMsg_PPBTCPSocket_ReadACK(
routing_id_, plugin_dispatcher_id_, socket_id_, false, std::string()));
« no previous file with comments | « content/browser/renderer_host/pepper_tcp_socket.h ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698