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

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

Issue 998293002: chrome.platformKeys.getKeyPair: Check requested algorithm against certificate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@require_alg_name
Patch Set: Created 5 years, 9 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_api .h"]
8 namespace platformKeysInternal { 8 namespace platformKeysInternal {
9 callback SelectCallback = void (platformKeys.Match[] certs); 9 callback SelectCallback = void (platformKeys.Match[] certs);
10 10
11 // Invoked by <code>sign</code>. 11 // Invoked by <code>sign</code>.
12 // |signature| The signature, a octet string. 12 // |signature| The signature, a octet string.
13 callback SignCallback = void(ArrayBuffer signature); 13 callback SignCallback = void(ArrayBuffer signature);
14 14
15 // Called back by <code>getPublicKey</code>. 15 // Called back by <code>getPublicKey</code>.
16 // |publicKey| The Subject Public Key Info (see X.509) of the requested 16 // |publicKey| The Subject Public Key Info (see X.509) of the requested
17 // certificate. 17 // certificate.
(...skipping 23 matching lines...) Expand all
41 // |data| The data to sign. 41 // |data| The data to sign.
42 // |callback| Called back with the signature of |data|. 42 // |callback| Called back with the signature of |data|.
43 // TODO: Instead of ArrayBuffer should be (ArrayBuffer or ArrayBufferView), 43 // TODO: Instead of ArrayBuffer should be (ArrayBuffer or ArrayBufferView),
44 // or at least (ArrayBuffer or Uint8Array). 44 // or at least (ArrayBuffer or Uint8Array).
45 static void sign(DOMString tokenId, 45 static void sign(DOMString tokenId,
46 ArrayBuffer publicKey, 46 ArrayBuffer publicKey,
47 DOMString hashAlgorithmName, 47 DOMString hashAlgorithmName,
48 ArrayBuffer data, 48 ArrayBuffer data,
49 SignCallback callback); 49 SignCallback callback);
50 50
51 // Calls back <code>callback</code> with details about the key certified by 51 // Checks whether <code>certificate</code> certifies a key that allows usage
52 // <code>certificate</code>. 52 // of the WebCrypto algorithm <code>algorithmName</code>. If so, calls back
Andrew T Wilson (Slow) 2015/03/19 07:38:12 Maybe document what happens if there is no allowab
pneubeck (no reviews) 2015/03/23 13:43:12 Error handling for extension APIs is very standard
53 // <code>callback</code> with the key info and a WebCrypto
54 // <code>KeyAlgorithm</code> dictionary describing the key's algorithm. The
55 // <code>name</code> property will equal <code>algorithmName</code>.
53 static void getPublicKey(ArrayBuffer certificate, 56 static void getPublicKey(ArrayBuffer certificate,
57 DOMString algorithmName,
54 GetPublicKeyCallback callback); 58 GetPublicKeyCallback callback);
55 }; 59 };
56 }; 60 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698