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..fea1b548e5c502ae7112b9094babd911366b2697 |
| --- /dev/null |
| +++ b/ppapi/api/private/ppb_flash_x509_certificate.idl |
| @@ -0,0 +1,127 @@ |
| +/* 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_X509_Certificate</code> interface for |
| + * an X509 certificate. |
| + */ |
| + |
| +label Chrome { |
| + M19 = 0.1 |
| +}; |
| + |
| +/** |
| + * Struct for storing information about a certificate issuer or subject. |
| + * All members are <code>PP_Var</code> strings. |
| + */ |
| +struct PP_Flash_X509_Certificate_Principal { |
| + PP_Var common_name; |
| + PP_Var locality_name; |
| + PP_Var state_or_province_name; |
| + PP_Var country_name; |
| + PP_Var organization_name; |
| + PP_Var organization_unit_name; |
| +}; |
| + |
| +[assert_size(4)] |
| +enum PPB_Flash_X509_Certificate_Version { |
| + PP_FLASH_X509_CERTIFICATE_V1 = 0, |
| + PP_FLASH_X509_CERTIFICATE_V2 = 1, |
| + PP_FLASH_X509_CERTIFICATE_V3 = 2 |
| +}; |
| + |
| +/** |
| + * The <code>PPB_Flash_X509_Certificate</code> interface provides access to |
| + * the fields of an X509 certificate. |
| + */ |
| +interface PPB_Flash_X509_Certificate { |
| + /** |
| + * 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([in] PP_Instance instance, |
| + [in] str_t bytes, |
| + [in] uint32_t length); |
| + |
| + /** |
| + * Returns <code>PP_TRUE</code> if a given resource is a |
| + * <code>PPB_Flash_X509_Certificate</code>. |
| + */ |
| + PP_Bool IsFlashX509Certificate([in] PP_Resource resource); |
| + |
| + /** |
| + * Get the certificate version. |
| + */ |
| + PPB_Flash_X509_Certificate_Version GetVersion([in] 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. |
| + */ |
| + PP_Var GetSerialNumber([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get the certificate algorithm OID string as a <code>PP_Var</code> string. |
| + */ |
| + PP_Var GetAlgorithmOID([in] 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. |
| + */ |
| + PP_Var GetAlgorithmParameters([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get the valid start date of the certificate. |
|
Ryan Sleevi
2012/02/21 19:22:42
s/valid/validity/ ?
|
| + */ |
| + PP_Time GetVaildStart([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get the valid end date of the certificate. |
| + */ |
| + PP_Time GetVaildEnd([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get the subject public key algorithm OID string as a <code>PP_Var</code> |
| + * string. |
| + */ |
| + PP_Var GetSubjectPublicKeyAlgorithmOID([in] 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. |
| + */ |
| + PP_Var GetDER([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get the subject public key as a byte array. The data is returned in a |
| + * <code>PP_Var</code> array buffer. |
| + */ |
| + PP_Var GetSubjectPublicKey([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get the issuers unique ID as a byte array. The data is returned in a |
| + * <code>PP_Var</code> array buffer. |
| + */ |
| + PP_Var GetIssuerUniqueID([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get the subjects unique ID as a byte array. The data is returned in a |
| + * <code>PP_Var</code> array buffer. |
|
Ryan Sleevi
2012/02/21 19:22:42
PP_Var can contain NULLs, correct?
I'm just antic
|
| + */ |
| + PP_Var GetSubjectUniqueID([in] PP_Resource certificate); |
| + |
| + /** |
| + * Get information about the certificate issuer. |
| + */ |
| + PP_Flash_X509_Certificate_Principal GetIssuerInfo(PP_Resource certificate); |
| + |
| + /** |
| + * Get information about the certificate subject. |
| + */ |
| + PP_Flash_X509_Certificate_Principal GetSubjectInfo(PP_Resource certificate); |
| +}; |