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

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

Issue 1289963003: Add idl for new chrome.certificateProvider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Use this API to expose certificates to the platform which can use these
6 // certificates for TLS authentications.
7 namespace certificateProvider {
8 enum Hash {
davidben 2015/08/17 15:42:52 Oh, noticed this from the other CL, but MD5_SHA1 a
pneubeck (no reviews) 2015/08/18 06:45:33 Done.
9 SHA1,
10 SHA256,
11 SHA384,
12 SHA512
not at google - send to devlin 2015/08/14 17:13:44 it would be nice to have a standard set of certifi
pneubeck (no reviews) 2015/08/17 12:13:49 Acknowledged.
13 };
14
15 dictionary CertificateInfo {
16 // Must be the DER encoding of a X.509 client certificate.
17 // Currently, only certificates of RSA keys are supported.
davidben 2015/08/17 15:38:03 Nit: Why is this comment wrapped differently from
pneubeck (no reviews) 2015/08/18 06:45:33 Done.
18 ArrayBuffer certificate;
19
20 // Must be set to all hashes supported for this certificate. This extension
21 // will only be asked for signatures of digests calculated with one of these
22 // hash algorithms.
23 Hash[] supportedHashes;
24 };
25
26 dictionary SignRequest {
27 // The digest that must be signed.
28 ArrayBuffer digest;
29
30 // Refers to the hash algorithm that was used to create |digest|.
31 Hash hash;
32
33 // The DER encoding of a X.509 client certificate. The extension must sign
34 // |digest| using the associated private key.
35 ArrayBuffer certificate;
36 };
37
38 // Either |error| or |signature| and not both must be set.
39 dictionary SignatureDetails {
40 // If the signature of the digest could not be calculated, this field must
41 // be set.
42 DOMString? error;
43
44 // If no error occurred, this field must be set to the signature of the
45 // digest using the private the of the requested client certificate.
46 // For an RSA key, the signature must be a PKCS#1 signature. The extension
47 // is responsible for prepending the DigestInfo prefix and adding PKCS#1
48 // padding.
49 ArrayBuffer? signature;
50 };
51
52 callback DoneCallback = void ();
53 callback SignCallback = void(SignatureDetails reply, DoneCallback callback);
54
55 // Notifies Chrome that this extension is capable of responding to signing
56 // requests for the certificates listed in |certificates|. The list must
57 // only contain certificates for which the extension can sign data
58 // using the associated private key.
59 callback CertificatesCallback =
60 void(CertificateInfo[] certificates, DoneCallback callback);
davidben 2015/08/17 15:38:03 I might not be understanding this idl syntax, but
pneubeck2 2015/08/17 15:42:56 Errors that are only detected in c++ must be retur
davidben 2015/08/17 16:46:11 But DoneCallback doesn't take any errors. I'm not
61
62 interface Events {
63 // This event fires every time the browser requests the current list of
64 // certificates provided by this extension. The extension must call
65 // |callback| exactly once with the current list of certificates.
66 static void onClientCertificatesRequested(CertificatesCallback callback);
67
68 // This event fires every time the browser needs to sign a message using a
69 // certificate provided by this extension using |publishClientCertificates|.
70 // The extension must sign the data in |request| using the appropriate
71 // algorithm and private key and return it by calling |callback|. |callback|
72 // must be called exactly once.
73 static void onSignDigestRequested(SignRequest request,
74 SignCallback callback);
75 };
76 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698