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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/PKCS11AuthenticationManager.java

Issue 164053004: Refactor AndroidKeyStore to allow remote key handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to abstract AndroidPrivateKey. Created 6 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import java.security.PrivateKey;
10 import java.security.cert.X509Certificate; 9 import java.security.cert.X509Certificate;
11 10
12 /** 11 /**
13 * Defines API for managing interaction with SmartCard-based certificate storage using PKCS11. 12 * Defines API for managing interaction with SmartCard-based certificate storage using PKCS11.
14 */ 13 */
15 public interface PKCS11AuthenticationManager { 14 public interface PKCS11AuthenticationManager {
16 15
17 /** 16 /**
18 * @return true iff SmartCard-based authentication is available. 17 * @return true iff SmartCard-based authentication is available.
19 */ 18 */
20 public boolean isPKCS11AuthEnabled(); 19 public boolean isPKCS11AuthEnabled();
21 20
22 /** 21 /**
23 * Retrieves the preferred client certificate alias for the given host, port pair, or null if 22 * Retrieves the preferred client certificate alias for the given host, port pair, or null if
24 * none can be retrieved. 23 * none can be retrieved.
25 * 24 *
26 * @param hostName The host for which to retrieve client certificate. 25 * @param hostName The host for which to retrieve client certificate.
27 * @param port The port to use in conjunction with host to retrieve client c ertificate. 26 * @param port The port to use in conjunction with host to retrieve client c ertificate.
28 */ 27 */
29 public String getClientCertificateAlias(String hostName, int port); 28 public String getClientCertificateAlias(String hostName, int port);
30 29
31 /** 30 /**
32 * Returns the X509Certificate chain for the requested alias, or null if no there is no result. 31 * Returns the X509Certificate chain for the requested alias, or null if no there is no result.
33 */ 32 */
34 public X509Certificate[] getCertificateChain(String alias); 33 public X509Certificate[] getCertificateChain(String alias);
35 34
36 /** 35 /**
37 * Returns the PrivateKey for the requested alias, or null if no there is no result.
38 */
39 public PrivateKey getPrivateKey(String alias);
40
41 /**
42 * Performs necessary initializing for using a PKCS11-based KeysStore. Note that this can 36 * Performs necessary initializing for using a PKCS11-based KeysStore. Note that this can
43 * perform expensive operations and cannot be done on the UI thread. 37 * perform expensive operations and cannot be done on the UI thread.
44 */ 38 */
45 public void initialize(Context context); 39 public void initialize(Context context);
46 } 40 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698