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

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

Issue 9693024: Add the PPAPI X509 Certificate interface and implementation. (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.h
diff --git a/content/browser/renderer_host/pepper_tcp_socket.h b/content/browser/renderer_host/pepper_tcp_socket.h
index af1b6ed610db9766cbbdcae37be3832f2a3149df..3539748b35d7483527f9ccb64d7fe74ce5cb4348 100644
--- a/content/browser/renderer_host/pepper_tcp_socket.h
+++ b/content/browser/renderer_host/pepper_tcp_socket.h
@@ -15,6 +15,10 @@
#include "net/base/completion_callback.h"
#include "ppapi/c/pp_stdint.h"
+namespace ppapi {
+class PPB_X509Certificate_Fields;
+}
+
class PepperMessageFilter;
struct PP_NetAddress_Private;
@@ -22,6 +26,7 @@ namespace net {
class IOBuffer;
class SingleRequestHostResolver;
class StreamSocket;
+class X509Certificate;
}
// PepperTCPSocket is used by PepperMessageFilter to handle requests from
@@ -52,6 +57,16 @@ class PepperTCPSocket {
void SendConnectACKError();
+ // Extracts the certificate field data from a |net::X509Certificate| into
+ // |PPB_X509Certificate_Fields|.
+ static bool GetCertificateFields(const net::X509Certificate& cert,
+ ppapi::PPB_X509Certificate_Fields* fields);
+ // Extracts the certificate field data from the DER representation of a
+ // certificate into |PPB_X509Certificate_Fields|.
+ static bool GetCertificateFields(const char* der,
+ uint32_t length,
+ ppapi::PPB_X509Certificate_Fields* fields);
+
private:
enum ConnectionState {
// Before a connection is successfully established (including a previous

Powered by Google App Engine
This is Rietveld 408576698