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

Side by Side Diff: ppapi/api/private/ppb_flash_x509_certificate.idl

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 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 /**
7 * This file defines the <code>PPB_Flash_X509Certificate</code> interface for
8 * an X509 certificate.
9 */
10
11 label Chrome {
12 M19 = 0.1
13 };
14
15 [assert_size(4)]
16 enum PP_Flash_X509Certificate_Field {
17 // Issuer/principal common name, locality name, state or province name,
18 // country name, organization name and organization unit name are returned as
19 // <code>PP_VARTYPE_STRING</code>.
Ryan Sleevi 2012/03/16 00:08:40 This is definitely outside of my domain, so feel f
raymes 2012/03/16 17:18:26 I definitely agree that consistency is better =).
20 PP_FLASH_X509CERTIFICATE_ISSUER_COMMON_NAME_= 0,
21 PP_FLASH_X509CERTIFICATE_ISSUER_LOCALITY_NAME_= 1,
22 PP_FLASH_X509CERTIFICATE_ISSUER_STATE_OR_PROVINCE_NAME_= 2,
23 PP_FLASH_X509CERTIFICATE_ISSUER_COUNTRY_NAME_= 3,
24 PP_FLASH_X509CERTIFICATE_ISSUER_ORGANIZATION_NAME_= 4,
25 PP_FLASH_X509CERTIFICATE_ISSUER_ORGANIZATION_UNIT_NAME_ = 5,
26 // The issuer/principal unique ID is returned as a
27 // <code>PP_VARTYPE_ARRAY_BUFFER</code>.
28 PP_FLASH_X509CERTIFICATE_ISSUER_UNIQUE_ID_ = 6,
29
30 PP_FLASH_X509CERTIFICATE_PRINCIPAL_COMMON_NAME_= 7,
31 PP_FLASH_X509CERTIFICATE_PRINCIPAL_LOCALITY_NAME_= 8,
32 PP_FLASH_X509CERTIFICATE_PRINCIPAL_STATE_OR_PROVINCE_NAME_= 9,
33 PP_FLASH_X509CERTIFICATE_PRINCIPAL_COUNTRY_NAME_= 10,
34 PP_FLASH_X509CERTIFICATE_PRINCIPAL_ORGANIZATION_NAME_= 11,
35 PP_FLASH_X509CERTIFICATE_PRINCIPAL_ORGANIZATION_UNIT_NAME_ = 12,
36 PP_FLASH_X509CERTIFICATE_PRINCIPAL_UNIQUE_ID_ = 13,
37
38 // The certificate version is returned as a <code>PP_VARTYPE_INT32</code> with
39 // 0=X509v1, 1=X509v2, 2=X509v3.
Ryan Sleevi 2012/03/16 00:08:40 Can this be a real pepper enum type? Or is that e
raymes 2012/03/16 17:18:26 Pepper can return an int which could be cast to an
40 PP_FLASH_X509CERTIFICATE_VERSION = 14,
41 // The certificate serial number is returned as a
42 // <code>PP_VARTYPE_ARRAY_BUFFER</code> with the leading 0 removed.
43 PP_FLASH_X509CERTIFICATE_SERIAL_NUMBER = 15,
44 // The algorithm OID is returned as a <code>PP_VARTYPE_STRING</code>.
45 PP_FLASH_X509CERTIFICATE_ALGORITHM_OID = 16,
46 // The algorithm paramaters encoded in DER are returned as a
47 // <code>PP_VARTYPE_STRING</code>.
Ryan Sleevi 2012/03/16 00:08:40 PP_VARTYPE_STRING -> PP_VARTYPE_ARRAY_BUFFER
raymes 2012/03/16 17:18:26 Done.
48 PP_FLASH_X509CERTIFICATE_ALGORITHM_PARAMATERS_RAW = 17,
49 // The validity not before and not after dates are returned as
50 // <code>PP_TIME</code>.
51 PP_FLASH_X509CERTIFICATE_VALIDITY_NOT_BEFORE = 18,
52 PP_FLASH_X509CERTIFICATE_VALIDITY_NOT_AFTER = 19,
53 // The subject public key algorithm OID is returned as a
54 // <code>PP_VARTYPE_STRING</code>.
55 PP_FLASH_X509CERTIFICATE_SUBJECT_PUBLIC_KEY_ALGORITHM_OID = 19,
56 // The public key is returned as a <code>PP_VARTYPE_ARRAY_BUFFER</code>.
57 PP_FLASH_X509CERTIFICATE_SUBJECT_PUBLIC_KEY = 20,
58 // The raw certificate encoded in DER format is returned as a
59 // <code>PP_VARTYPE_ARRAY_BUFFER</code>.
60 PP_FLASH_X509CERTIFICATE_RAW = 21
61 };
62
63 /**
64 * The <code>PPB_Flash_X509Certificate</code> interface provides access to
65 * the fields of an X509 certificate.
66 */
67 interface PPB_Flash_X509Certificate {
68 /**
69 * Allocates a <code>PPB_Flash_X509Certificate</code> resource.
70 * <code>Init()</code> must be called before using the certificate.
71 */
72 PP_Resource Create([in] PP_Instance instance);
73
74 /**
75 * Returns <code>PP_TRUE</code> if a given resource is a
76 * <code>PPB_Flash_X509Certificate</code>.
77 */
78 PP_Bool IsFlashX509Certificate([in] PP_Resource resource);
79
80 /**
81 * Initialize a <code>PPB_Flash_X509Certificate</code> from the DER-encoded
82 * representation. |bytes| should represent only a single certificate.
83 * <code>PP_FALSE</code> is returned if |bytes| is not a valid DER-encoding of
84 * a certificate. Note: Flash requires this to be synchronous.
85 */
86 PP_Bool Init([in] PP_Resource resource,
87 [in] str_t bytes,
88 [in] uint32_t length);
89
90 /**
91 * Get a field of the X509Certificate as a <code>PP_Var</code>. A null
92 * <code>PP_Var</code> is returned if the field is unavailable.
93 */
94 PP_Var GetField([in] PP_Resource resource,
95 [in] PP_Flash_X509Certificate_Field field);
96 };
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.cc ('k') | ppapi/c/private/ppb_flash_x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698