| Index: chrome/common/extensions/api/enterprise_platform_keys.idl
|
| diff --git a/chrome/common/extensions/api/enterprise_platform_keys.idl b/chrome/common/extensions/api/enterprise_platform_keys.idl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..15cad3dc00208bc91b6460c688ead7c2f8b08158
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/api/enterprise_platform_keys.idl
|
| @@ -0,0 +1,51 @@
|
| +// Copyright 2014 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.
|
| +
|
| +// Use the <code>chrome.enterprise.platformKeys</code> API to generate
|
| +// hardware-backed keys and to install certificates for these keys. The
|
| +// certificates will be available to the platform and can, for example, be used
|
| +// for TLS authentication and network access.
|
| +[ platforms = ("chromeos") ]
|
| +namespace enterprise.platformKeys {
|
| + [nocompile] dictionary Token {
|
| + // The unique identifier of this Token.
|
| + DOMString id;
|
| +
|
| + // Implements the WebCrypto.SubtleCrypto interface. The crypto operations
|
| + // are hardware-backed.
|
| + [instanceOf = SubtleCrypto] object subtleCrypto;
|
| + };
|
| + // Invoked by <code>getTokens</code> with the list of available Tokens.
|
| + callback GetTokensCallback = void(Token[] tokens);
|
| +
|
| + // Callback to which the certificates are passed.
|
| + callback GetCertificatesCallback = void(ArrayBuffer[] certificates);
|
| +
|
| + // Invoked by importCertificate or removeCertificate when the respective
|
| + // operation is finished.
|
| + callback DoneCallback = void();
|
| +
|
| + interface Functions {
|
| + // Gets all available Tokens.
|
| + [nocompile] static void getTokens(GetTokensCallback callback);
|
| +
|
| + // Gets all certificates of the token with |tokenId|.
|
| + static void getCertificates(DOMString tokenId,
|
| + GetCertificatesCallback callback);
|
| +
|
| + // Imports |certificate| to the token with |tokenId|.
|
| + // TODO: Instead of ArrayBuffer should be (ArrayBuffer or ArrayBufferView),
|
| + // or at least (ArrayBuffer or Uint8Array).
|
| + static void importCertificate(DOMString tokenId,
|
| + ArrayBuffer certificate,
|
| + optional DoneCallback callback);
|
| +
|
| + // Removes |certificate| from the token with |tokenId|.
|
| + // TODO: Instead of ArrayBuffer should be (ArrayBuffer or ArrayBufferView),
|
| + // or at least (ArrayBuffer or Uint8Array).
|
| + static void removeCertificate(DOMString tokenId,
|
| + ArrayBuffer certificate,
|
| + optional DoneCallback callback);
|
| + };
|
| +};
|
|
|