Index: content/browser/renderer_host/pepper/pepper_socket_utils.h |
diff --git a/content/browser/renderer_host/pepper/pepper_socket_utils.h b/content/browser/renderer_host/pepper/pepper_socket_utils.h |
index 7a0cef56a5ce3bcbb5667dc43ea845dc978a471f..7a1e16b0487a4e75137a98bfc1c16b601a3bc519 100644 |
--- a/content/browser/renderer_host/pepper/pepper_socket_utils.h |
+++ b/content/browser/renderer_host/pepper/pepper_socket_utils.h |
@@ -6,9 +6,18 @@ |
#define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_ |
#include "content/public/common/socket_permission_request.h" |
+#include "ppapi/c/pp_stdint.h" |
struct PP_NetAddress_Private; |
+namespace net { |
+class X509Certificate; |
+} |
+ |
+namespace ppapi { |
+class PPB_X509Certificate_Fields; |
+} |
+ |
namespace content { |
class RenderViewHost; |
@@ -31,6 +40,17 @@ bool CanUseSocketAPIs(bool external_plugin, |
const SocketPermissionRequest& params, |
RenderViewHost* render_view_host); |
+// Extracts the certificate field data from a net::X509Certificate into |
+// PPB_X509Certificate_Fields. |
+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. |
+bool GetCertificateFields(const char* der, |
+ uint32_t length, |
+ ppapi::PPB_X509Certificate_Fields* fields); |
+ |
} // namespace pepper_socket_utils |
} // namespace content |