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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /* From private/ppb_flash_x509_certificate.idl,
7 * modified Tue Feb 21 11:01:31 2012.
8 */
9
10 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_X509_CERTIFICATE_H_
11 #define PPAPI_C_PRIVATE_PPB_FLASH_X509_CERTIFICATE_H_
12
13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_resource.h"
17 #include "ppapi/c/pp_stdint.h"
18 #include "ppapi/c/pp_time.h"
19 #include "ppapi/c/pp_var.h"
20
21 #define PPB_FLASH_X509_CERTIFICATE_INTERFACE_0_1 \
22 "PPB_Flash_X509_Certificate;0.1"
23 #define PPB_FLASH_X509_CERTIFICATE_INTERFACE \
24 PPB_FLASH_X509_CERTIFICATE_INTERFACE_0_1
25
26 /**
27 * @file
28 * This file defines the <code>PPB_Flash_X509_Certificate</code> interface for
29 * an X509 certificate.
30 */
31
32
33 /**
34 * @addtogroup Structs
35 * @{
36 */
37 /**
38 * Struct for storing information about a certificate issuer or subject.
39 * All members are <code>PP_Var</code> strings.
40 */
41 struct PP_Flash_X509_Certificate_Principal {
42 struct PP_Var common_name;
43 struct PP_Var locality_name;
44 struct PP_Var state_or_province_name;
45 struct PP_Var country_name;
46 struct PP_Var organization_name;
47 struct PP_Var organization_unit_name;
48 };
49 /**
50 * @}
51 */
52
53 /**
54 * @addtogroup Enums
55 * @{
56 */
57 typedef enum {
58 PP_FLASH_X509_CERTIFICATE_V1 = 0,
59 PP_FLASH_X509_CERTIFICATE_V2 = 1,
60 PP_FLASH_X509_CERTIFICATE_V3 = 2
61 } PPB_Flash_X509_Certificate_Version;
62 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPB_Flash_X509_Certificate_Version, 4);
63 /**
64 * @}
65 */
66
67 /**
68 * @addtogroup Interfaces
69 * @{
70 */
71 /**
72 * The <code>PPB_Flash_X509_Certificate</code> interface provides access to
73 * the fields of an X509 certificate.
74 */
75 struct PPB_Flash_X509_Certificate_0_1 {
76 /**
77 * Create a <code>PPB_Flash_X509_Certificate</code> from the DER-encoded
78 * representation. Returns a null resource if the byte array is not a valid
79 * X509 certificate. The input data should represent only a single
80 * certificate.
81 */
82 PP_Resource (*Create)(PP_Instance instance,
83 const char* bytes,
84 uint32_t length);
85 /**
86 * Returns <code>PP_TRUE</code> if a given resource is a
87 * <code>PPB_Flash_X509_Certificate</code>.
88 */
89 PP_Bool (*IsFlashX509Certificate)(PP_Resource resource);
90 /**
91 * Get the certificate version.
92 */
93 PPB_Flash_X509_Certificate_Version (*GetVersion)(PP_Resource certificate);
94 /**
95 * Get the certificate serial number as a byte array with the leading 0
96 * included. The data is returned in a <code>PP_Var</code> array buffer.
97 */
98 struct PP_Var (*GetSerialNumber)(PP_Resource certificate);
99 /**
100 * Get the certificate algorithm OID string as a <code>PP_Var</code> string.
101 */
102 struct PP_Var (*GetAlgorithmOID)(PP_Resource certificate);
103 /**
104 * Get the certificate algorithm paramaters as a byte array encoded in DER
105 * format. The data is returned in a <code>PP_Var</code> array buffer.
106 */
107 struct PP_Var (*GetAlgorithmParameters)(PP_Resource certificate);
108 /**
109 * Get the valid start date of the certificate.
110 */
111 PP_Time (*GetVaildStart)(PP_Resource certificate);
112 /**
113 * Get the valid end date of the certificate.
114 */
115 PP_Time (*GetVaildEnd)(PP_Resource certificate);
116 /**
117 * Get the subject public key algorithm OID string as a <code>PP_Var</code>
118 * string.
119 */
120 struct PP_Var (*GetSubjectPublicKeyAlgorithmOID)(PP_Resource certificate);
121 /**
122 * Get the certificate as a byte array encoded in DER format. The data is
123 * returned in a <code>PP_Var</code> array buffer.
124 */
125 struct PP_Var (*GetDER)(PP_Resource certificate);
126 /**
127 * Get the subject public key as a byte array. The data is returned in a
128 * <code>PP_Var</code> array buffer.
129 */
130 struct PP_Var (*GetSubjectPublicKey)(PP_Resource certificate);
131 /**
132 * Get the issuers unique ID as a byte array. The data is returned in a
133 * <code>PP_Var</code> array buffer.
134 */
135 struct PP_Var (*GetIssuerUniqueID)(PP_Resource certificate);
136 /**
137 * Get the subjects unique ID as a byte array. The data is returned in a
138 * <code>PP_Var</code> array buffer.
139 */
140 struct PP_Var (*GetSubjectUniqueID)(PP_Resource certificate);
141 /**
142 * Get information about the certificate issuer.
143 */
144 struct PP_Flash_X509_Certificate_Principal* (*GetIssuerInfo)(
145 PP_Resource certificate);
146 /**
147 * Get information about the certificate subject.
148 */
149 struct PP_Flash_X509_Certificate_Principal* (*GetSubjectInfo)(
150 PP_Resource certificate);
151 };
152
153 typedef struct PPB_Flash_X509_Certificate_0_1 PPB_Flash_X509_Certificate;
154 /**
155 * @}
156 */
157
158 #endif /* PPAPI_C_PRIVATE_PPB_FLASH_X509_CERTIFICATE_H_ */
159
OLDNEW
« 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