Chromium Code Reviews| Index: ppapi/api/private/ppb_flash_x509_certificate.idl |
| diff --git a/ppapi/api/private/ppb_flash_x509_certificate.idl b/ppapi/api/private/ppb_flash_x509_certificate.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b26104735be491340f3e351ba390ea76fa7ea6fd |
| --- /dev/null |
| +++ b/ppapi/api/private/ppb_flash_x509_certificate.idl |
| @@ -0,0 +1,79 @@ |
| +/* 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. |
| + */ |
| + |
| +/** |
| + * This file defines the <code>PPB_Flash_X509Certificate</code> interface for |
| + * an X509 certificate. |
| + */ |
| + |
| +label Chrome { |
| + M19 = 0.1 |
| +}; |
| + |
| +// TODO(raymes): Document the types of the return values for each of these |
| +// fields as they are implemented. |
| +[assert_size(4)] |
| +enum PP_Flash_X509Certificate_Field { |
| + PP_FLASH_X509CERTIFICATE_ISSUER_COMMON_NAME_= 0, |
| + PP_FLASH_X509CERTIFICATE_ISSUER_LOCALITY_NAME_= 1, |
| + PP_FLASH_X509CERTIFICATE_ISSUER_STATE_OR_PROVINCE_NAME_= 2, |
| + PP_FLASH_X509CERTIFICATE_ISSUER_COUNTRY_NAME_= 3, |
| + PP_FLASH_X509CERTIFICATE_ISSUER_ORGANIZATION_NAME_= 4, |
| + PP_FLASH_X509CERTIFICATE_ISSUER_ORGANIZATION_UNIT_NAME_ = 5, |
|
Ryan Sleevi
2012/03/15 02:27:56
19 - 24: UTF-8 strings (PP_VARTYPE_STRING ?)
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_ISSUER_UNIQUE_ID_ = 6, |
|
Ryan Sleevi
2012/03/15 02:27:56
25: A raw byte array (PP_VARTYPE_ARRAY_BUFFER ?)
raymes
2012/03/15 20:32:14
Done.
|
| + |
| + PP_FLASH_X509CERTIFICATE_PRINCIPAL_COMMON_NAME_= 7, |
| + PP_FLASH_X509CERTIFICATE_PRINCIPAL_LOCALITY_NAME_= 8, |
| + PP_FLASH_X509CERTIFICATE_PRINCIPAL_STATE_OR_PROVINCE_NAME_= 9, |
| + PP_FLASH_X509CERTIFICATE_PRINCIPAL_COUNTRY_NAME_= 10, |
| + PP_FLASH_X509CERTIFICATE_PRINCIPAL_ORGANIZATION_NAME_= 11, |
| + PP_FLASH_X509CERTIFICATE_PRINCIPAL_ORGANIZATION_UNIT_NAME_ = 12, |
|
Ryan Sleevi
2012/03/15 02:27:56
27 - 32: UTF-8 strings (PP_VARTYPE_STRING ?)
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_PRINCIPAL_UNIQUE_ID_ = 13, |
|
Ryan Sleevi
2012/03/15 02:27:56
33: A raw byte array (PP_VARTYPE_ARRAY_BUFFER ?)
raymes
2012/03/15 20:32:14
Done.
|
| + |
| + PP_FLASH_X509CERTIFICATE_VERSION = 14, |
|
Ryan Sleevi
2012/03/15 02:27:56
35: Some enum (X509v1, X509v2, X509v3)
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_SERIAL_NUMBER = 15, |
|
Ryan Sleevi
2012/03/15 02:27:56
36: A raw byte array (PP_VARTYPE_ARRAY_BUFFER ?)
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_ALGORITHM_OID = 16, |
|
Ryan Sleevi
2012/03/15 02:27:56
37: A string (which will surely cheese someone in
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_ALGORITHM_PARAMATERS = 17, |
|
Ryan Sleevi
2012/03/15 02:27:56
38: If polymorphic structs are allowed, I'd like t
raymes
2012/03/15 20:32:14
AFAIK they aren't supported but there may be some
|
| + PP_FLASH_X509CERTIFICATE_VALIDITY_DATE_RANGE = 18, |
|
Ryan Sleevi
2012/03/15 02:27:56
39: This seems like it should be X509CERTIFICATE_V
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_SUBJECT_PUBLIC_KEY_ALGORITHM_OID = 19, |
|
Ryan Sleevi
2012/03/15 02:27:56
40: A string (same as 37) - PP_VARTYPE_STRING ?
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_SUBJECT_PUBLIC_KEY = 20, |
|
Ryan Sleevi
2012/03/15 02:27:56
41: A raw byte array - PP_VARTYPE_ARRAY_BUFFER ?
raymes
2012/03/15 20:32:14
Nope =/
On 2012/03/15 02:27:56, Ryan Sleevi wrote:
|
| + PP_FLASH_X509CERTIFICATE_DER = 21, |
|
Ryan Sleevi
2012/03/15 02:27:56
42: I'm slightly inclined to call this _RAW, simil
raymes
2012/03/15 20:32:14
Done.
|
| + PP_FLASH_X509CERTIFICATE_FIELD_COUNT = 22 |
| +}; |
| + |
| +/** |
| + * The <code>PPB_Flash_X509Certificate</code> interface provides access to |
| + * the fields of an X509 certificate. |
| + */ |
| +interface PPB_Flash_X509Certificate { |
| + /** |
| + * Allocates a <code>PPB_Flash_X509Certificate</code> resource. |
| + * <code>Init()</code> must be called before using the certificate. |
| + */ |
| + PP_Resource Create([in] PP_Instance instance); |
| + |
| + /** |
| + * Returns <code>PP_TRUE</code> if a given resource is a |
| + * <code>PPB_Flash_X509Certificate</code>. |
| + */ |
| + PP_Bool IsFlashX509Certificate([in] PP_Resource resource); |
| + |
| + /** |
| + * Initialize a <code>PPB_Flash_X509Certificate</code> from the DER-encoded |
| + * representation. |bytes| should represent only a single certificate. |
| + * <code>PP_FALSE</code> is returned if |bytes| is not a valid DER-encoding of |
| + * a certificate. Note: Flash requires this to be synchronous. |
| + */ |
| + PP_Bool Init([in] PP_Resource resource, |
| + [in] str_t bytes, |
|
Ryan Sleevi
2012/03/15 02:27:56
I don't see where str_t is defined in the existing
raymes
2012/03/15 20:32:14
str_t is the idl type for const char*.
On 2012/03
|
| + [in] uint32_t length); |
| + |
| + /** |
| + * Get a field of the X509Certificate as a |PP_Var|. A null |PP_Var| |
| + * is returned if the field is unavailable. |
| + */ |
| + PP_Var GetField([in] PP_Resource resource, |
| + [in] PP_Flash_X509Certificate_Field field); |
| +}; |