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

Side by Side Diff: chrome/common/extensions/api/platform_keys_internal.idl

Issue 875373002: First implementation of chrome.platformKeys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_idl
Patch Set: Fix .gn file. Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Internal API for to implement the platformKeys and enterprise.platformKeys 5 // Internal API for to implement the platformKeys and enterprise.platformKeys
6 // APIs. 6 // APIs.
7 [ implemented_in = "chrome/browser/extensions/api/platform_keys/platform_keys_ap i.h" ] 7 [ implemented_in = "chrome/browser/extensions/api/platform_keys/platform_keys_ap i.h" ]
8 namespace platformKeysInternal { 8 namespace platformKeysInternal {
9 callback SelectCallback = void (platformKeys.Match[] certs);
10
9 // Invoked by <code>sign</code>. 11 // Invoked by <code>sign</code>.
10 // |signature| The signature, a octet string. 12 // |signature| The signature, a octet string.
11 callback SignCallback = void(ArrayBuffer signature); 13 callback SignCallback = void(ArrayBuffer signature);
12 14
13 interface Functions { 15 interface Functions {
16 // See documentation in platformKeys.
17 static void selectClientCertificates(
18 platformKeys.SelectDetails details,
19 SelectCallback callback);
20
14 // Internal version of platformKeys.subtleCrypto.sign and 21 // Internal version of platformKeys.subtleCrypto.sign and
15 // enterprise.platformKeys.Token.subtleCrypto.sign. 22 // enterprise.platformKeys.Token.subtleCrypto.sign.
16 // |tokenId| The id of a Token returned by |getTokens|. 23 // |tokenId| The id of a Token returned by |getTokens|.
17 // |publicKey| The Subject Public Key Info of a key previously generated by 24 // |publicKey| The Subject Public Key Info of a key previously generated by
18 // |generateKey| in DER encoding. 25 // |generateKey| in DER encoding.
19 // |hashAlgorithmName| The recognized algorithm name as specified by 26 // |hashAlgorithmName| The recognized algorithm name as specified by
20 // WebCrypto of the hash algorithm that will be used to digest |data| 27 // WebCrypto of the hash algorithm that will be used to digest |data|
21 // before signing. Currently supported are: SHA-{1,256,384,512}. 28 // before signing. Currently supported are: SHA-{1,256,384,512}.
22 // TODO(pneubeck): use an enum once supported: 29 // TODO(pneubeck): use an enum once supported:
23 // http://www.crbug.com/385539 . 30 // http://www.crbug.com/385539 .
24 // |data| The data to sign. 31 // |data| The data to sign.
25 // |callback| Called back with the signature of |data|. 32 // |callback| Called back with the signature of |data|.
26 // TODO: Instead of ArrayBuffer should be (ArrayBuffer or ArrayBufferView), 33 // TODO: Instead of ArrayBuffer should be (ArrayBuffer or ArrayBufferView),
27 // or at least (ArrayBuffer or Uint8Array). 34 // or at least (ArrayBuffer or Uint8Array).
28 static void sign(DOMString tokenId, 35 static void sign(DOMString tokenId,
29 ArrayBuffer publicKey, 36 ArrayBuffer publicKey,
30 DOMString hashAlgorithmName, 37 DOMString hashAlgorithmName,
31 ArrayBuffer data, 38 ArrayBuffer data,
32 SignCallback callback); 39 SignCallback callback);
33 }; 40 };
34 }; 41 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/_permission_features.json ('k') | chrome/common/extensions/api/schemas.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698