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

Unified Diff: ppapi/c/private/ppb_flash_x509_certificate.h

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, 10 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: ppapi/c/private/ppb_flash_x509_certificate.h
diff --git a/ppapi/c/private/ppb_flash_x509_certificate.h b/ppapi/c/private/ppb_flash_x509_certificate.h
new file mode 100644
index 0000000000000000000000000000000000000000..4672c21d27983228fedfd43430b4385348b07855
--- /dev/null
+++ b/ppapi/c/private/ppb_flash_x509_certificate.h
@@ -0,0 +1,155 @@
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* From private/ppb_flash_x509_certificate.idl,
+ * modified Thu Feb 16 10:17:57 2012.
+ */
+
+#ifndef PPAPI_C_PRIVATE_PPB_FLASH_X509_CERTIFICATE_H_
+#define PPAPI_C_PRIVATE_PPB_FLASH_X509_CERTIFICATE_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_var.h"
+
+#define PPB_FLASH_X509CERTIFICATE_INTERFACE_0_1 "PPB_Flash_X509Certificate;0.1"
+#define PPB_FLASH_X509CERTIFICATE_INTERFACE \
+ PPB_FLASH_X509CERTIFICATE_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPB_Flash_X509Certificate</code> interface for
+ * an X509 certificate.
+ */
+
+
+/**
+ * @addtogroup Structs
+ * @{
+ */
+/**
+ * Struct for storing information about a certificate issuer or subject.
+ * All members are <code>PP_Var</code> strings.
+ */
+struct PP_Flash_X509Certificate_Principal {
+ struct PP_Var common_name;
+ struct PP_Var locality_name;
+ struct PP_Var state_or_province_name;
+ struct PP_Var country_name;
+ struct PP_Var organization_name;
+ struct PP_Var organization_unit_name;
+};
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+typedef enum {
+ PP_FLASH_X509_CERTIFICATE_V1 = 0,
+ PP_FLASH_X509CERTIFICATE_V2 = 1,
+ PP_FLASH_X509CERTIFICATE_V3 = 2
+} PPB_Flash_X509Certificate_Version;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPB_Flash_X509Certificate_Version, 4);
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * The <code>PPB_Flash_X509Certificate</code> interface provides access to
+ * the fields of an X509 certificate.
+ */
+struct PPB_Flash_X509Certificate_0_1 {
+ /**
+ * Create a <code>PPB_Flash_X509Certificate</code> from the DER-encoded
+ * representation. Returns a null resource if the byte array is not a valid
+ * X509 certificate.
+ */
+ PP_Resource (*Create)(PP_Instance instance,
+ const void* bytes,
+ int32_t length);
+ /**
+ * Returns <code>PP_TRUE</code> if a given resource is a
+ * <code>PPB_Flash_X509Certificate</code>.
+ */
+ PP_Bool (*IsFlashX509Certificate)(PP_Resource resource);
+ /**
+ * Get the certificate version.
+ */
+ PPB_Flash_X509Certificate_Version (*GetVersion)(PP_Resource certificate);
+ /**
+ * Get the certificate serial number as a byte array.
+ */
+ void* (*GetSerialNumber)(PP_Resource certificate, uint32_t* length);
+ /**
+ * Get the certificate algorithm ID as a <code>PP_Var</code> string.
+ */
+ struct PP_Var (*GetAlgorithmID)(PP_Resource certificate);
+ /**
+ * Get the certificate algorithm paramaters as a byte array.
+ */
+ void* (*GetAlgorithmParamaters)(PP_Resource certificate, uint32_t* length);
+ /**
+ * Get the valid start date as a timestamp.
+ */
+ uint32_t (*GetVaildStart)(PP_Resource certificate);
+ /**
+ * Get the valid end date as a timestamp.
+ */
+ uint32_t (*GetVaildEnd)(PP_Resource certificate);
+ /**
+ * Get the subject public key algorithm ID as a <code>PP_Var</code> string.
+ */
+ struct PP_Var (*GetSubjectPublicKeyAlgorithmID)(PP_Resource certificate);
+ /**
+ * Get the subject public key as a byte array.
+ */
+ struct PP_Var (*GetSubjectPublicKey)(PP_Resource certificate,
+ uint32_t* length);
+ /**
+ * Get the certificate as a byte array encoded in DER format.
+ */
+ void* (*GetDER)(PP_Resource certificate, uint32_t* length);
+ /**
+ * Get the subject public key as a byte array.
+ */
+ struct PP_Var (*GetSubjectPublicKey)(PP_Resource certificate,
+ uint32_t* length);
+ /**
+ * Get the issuers unique ID as a byte array.
+ */
+ void* (*GetIssuerUniqueID)(PP_Resource certificate, uint32_t* length);
+ /**
+ * Get the subjects unique ID as a byte array.
+ */
+ void* (*GetSubjectUniqueID)(PP_Resource certificate, uint32_t* length);
+ /**
+ * Get information about the certificate issuer.
+ */
+ struct PP_Flash_X509Certificate_Principal* (*GetIssuerInfo)(
+ PP_Resource certificate);
+ /**
+ * Get information about the certificate subject.
+ */
+ struct PP_Flash_X509Certificate_Principal* (*GetSubjectInfo)(
+ PP_Resource certificate);
+};
+
+typedef struct PPB_Flash_X509Certificate_0_1 PPB_Flash_X509Certificate;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PRIVATE_PPB_FLASH_X509_CERTIFICATE_H_ */
+
« ppapi/api/private/ppb_flash_x509_certificate.idl ('K') | « ppapi/c/private/ppb_flash_tcp_socket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698