Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 // Internal API for platform keys and certificate management. | |
| 6 [ nodoc = true, | |
| 7 platforms = ("chromeos"), | |
| 8 implemented_in = "chrome/browser/extensions/api/enterprise_platform_keys/enter prise_platform_keys_api.h" ] | |
| 9 namespace enterprise.platformKeysInternal { | |
| 10 // Invoked by <code>getTokens</code>. | |
| 11 // |tokenIds| The list of IDs of the avialable Tokens. | |
| 12 callback GetTokensCallback = void(DOMString[] tokenIds); | |
| 13 | |
| 14 // Invoked by <code>generateKey</code>. | |
| 15 // |publicKey| The Subject Public Key Info (see X.509) of the generated key | |
| 16 // in DER encoding. | |
| 17 callback GenerateKeyCallback = void(ArrayBuffer publicKey); | |
| 18 | |
| 19 // Invoked by <code>sign</code>. | |
| 20 // |signature| The signature, a octet string. | |
| 21 callback SignCallback = void(ArrayBuffer signature); | |
| 22 | |
| 23 interface Functions { | |
| 24 // Internal version of entrprise.platformKeys.getTokens. Returns a list of | |
| 25 // token IDs instead of token objects. | |
| 26 static void getTokens(GetTokensCallback callback); | |
| 27 | |
| 28 // Internal version of Token.generateKey. | |
| 29 // |tokenId| The id of a Token returned by |getTokens|. | |
| 30 // |callback| Called back with the Subject Public Key Info of the generated | |
| 31 // key. | |
| 32 static void generateKey(DOMString tokenId, GenerateKeyCallback callback); | |
| 33 | |
| 34 // Internal version of Token.sign. | |
| 35 // |tokenId| The id of a Token returned by |getTokens|. | |
| 36 // |publicKey| The Subject Public Key Info of a key previously generated by | |
| 37 // |generateKey| in DER encoding. | |
| 38 // |data| The data to sign. | |
| 39 // |callback| Called back with the signature of |data|. | |
| 40 static void sign(DOMString tokenId, | |
| 41 ArrayBuffer publicKey, | |
|
pneubeck (no reviews)
2014/05/06 14:07:21
@Benjamin,
all arguments which are currently Arra
not at google - send to devlin
2014/05/07 00:00:12
Not sure what you mean by this last paragraph, but
pneubeck (no reviews)
2014/05/07 21:44:19
I have to do the same for the externally visible A
| |
| 42 ArrayBuffer data, | |
| 43 SignCallback callback); | |
| 44 }; | |
| 45 }; | |
| OLD | NEW |