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

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..123ea57268b4f688d48611c5c834bc306e7ebd77
--- /dev/null
+++ b/ppapi/c/private/ppb_flash_x509_certificate.h
@@ -0,0 +1,159 @@
+/* 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 Tue Feb 21 11:01:31 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_time.h"
+#include "ppapi/c/pp_var.h"
+
+#define PPB_FLASH_X509_CERTIFICATE_INTERFACE_0_1 \
+ "PPB_Flash_X509_Certificate;0.1"
+#define PPB_FLASH_X509_CERTIFICATE_INTERFACE \
+ PPB_FLASH_X509_CERTIFICATE_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPB_Flash_X509_Certificate</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_X509_Certificate_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_X509_CERTIFICATE_V2 = 1,
+ PP_FLASH_X509_CERTIFICATE_V3 = 2
+} PPB_Flash_X509_Certificate_Version;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPB_Flash_X509_Certificate_Version, 4);
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * The <code>PPB_Flash_X509_Certificate</code> interface provides access to
+ * the fields of an X509 certificate.
+ */
+struct PPB_Flash_X509_Certificate_0_1 {
+ /**
+ * Create a <code>PPB_Flash_X509_Certificate</code> from the DER-encoded
+ * representation. Returns a null resource if the byte array is not a valid
+ * X509 certificate. The input data should represent only a single
+ * certificate.
+ */
+ PP_Resource (*Create)(PP_Instance instance,
+ const char* bytes,
+ uint32_t length);
+ /**
+ * Returns <code>PP_TRUE</code> if a given resource is a
+ * <code>PPB_Flash_X509_Certificate</code>.
+ */
+ PP_Bool (*IsFlashX509Certificate)(PP_Resource resource);
+ /**
+ * Get the certificate version.
+ */
+ PPB_Flash_X509_Certificate_Version (*GetVersion)(PP_Resource certificate);
+ /**
+ * Get the certificate serial number as a byte array with the leading 0
+ * included. The data is returned in a <code>PP_Var</code> array buffer.
+ */
+ struct PP_Var (*GetSerialNumber)(PP_Resource certificate);
+ /**
+ * Get the certificate algorithm OID string as a <code>PP_Var</code> string.
+ */
+ struct PP_Var (*GetAlgorithmOID)(PP_Resource certificate);
+ /**
+ * Get the certificate algorithm paramaters as a byte array encoded in DER
+ * format. The data is returned in a <code>PP_Var</code> array buffer.
+ */
+ struct PP_Var (*GetAlgorithmParameters)(PP_Resource certificate);
+ /**
+ * Get the valid start date of the certificate.
+ */
+ PP_Time (*GetVaildStart)(PP_Resource certificate);
+ /**
+ * Get the valid end date of the certificate.
+ */
+ PP_Time (*GetVaildEnd)(PP_Resource certificate);
+ /**
+ * Get the subject public key algorithm OID string as a <code>PP_Var</code>
+ * string.
+ */
+ struct PP_Var (*GetSubjectPublicKeyAlgorithmOID)(PP_Resource certificate);
+ /**
+ * Get the certificate as a byte array encoded in DER format. The data is
+ * returned in a <code>PP_Var</code> array buffer.
+ */
+ struct PP_Var (*GetDER)(PP_Resource certificate);
+ /**
+ * Get the subject public key as a byte array. The data is returned in a
+ * <code>PP_Var</code> array buffer.
+ */
+ struct PP_Var (*GetSubjectPublicKey)(PP_Resource certificate);
+ /**
+ * Get the issuers unique ID as a byte array. The data is returned in a
+ * <code>PP_Var</code> array buffer.
+ */
+ struct PP_Var (*GetIssuerUniqueID)(PP_Resource certificate);
+ /**
+ * Get the subjects unique ID as a byte array. The data is returned in a
+ * <code>PP_Var</code> array buffer.
+ */
+ struct PP_Var (*GetSubjectUniqueID)(PP_Resource certificate);
+ /**
+ * Get information about the certificate issuer.
+ */
+ struct PP_Flash_X509_Certificate_Principal* (*GetIssuerInfo)(
+ PP_Resource certificate);
+ /**
+ * Get information about the certificate subject.
+ */
+ struct PP_Flash_X509_Certificate_Principal* (*GetSubjectInfo)(
+ PP_Resource certificate);
+};
+
+typedef struct PPB_Flash_X509_Certificate_0_1 PPB_Flash_X509_Certificate;
+/**
+ * @}
+ */
+
+#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