Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c20ba757 authored by Selim Gurun's avatar Selim Gurun Committed by Android (Google) Code Review
Browse files

Merge "Provide a way to supply different algorithms for token binding key"

parents edef50b6 57a8d2ae
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -46620,12 +46620,18 @@ package android.webkit {
    method public abstract void deleteKey(android.net.Uri, android.webkit.ValueCallback<java.lang.Boolean>);
    method public abstract void deleteKey(android.net.Uri, android.webkit.ValueCallback<java.lang.Boolean>);
    method public abstract void enableTokenBinding();
    method public abstract void enableTokenBinding();
    method public static android.webkit.TokenBindingService getInstance();
    method public static android.webkit.TokenBindingService getInstance();
    method public abstract void getKey(android.net.Uri, java.lang.String, android.webkit.ValueCallback<java.security.KeyPair>);
    method public abstract void getKey(android.net.Uri, java.lang.String[], android.webkit.ValueCallback<android.webkit.TokenBindingService.TokenBindingKey>);
    field public static final java.lang.String KEY_ALGORITHM_ECDSAP256 = "ECDSAP256";
    field public static final java.lang.String KEY_ALGORITHM_ECDSAP256 = "ECDSAP256";
    field public static final java.lang.String KEY_ALGORITHM_RSA2048_PKCS_1_5 = "RSA2048_PKCS_1.5";
    field public static final java.lang.String KEY_ALGORITHM_RSA2048_PKCS_1_5 = "RSA2048_PKCS_1.5";
    field public static final java.lang.String KEY_ALGORITHM_RSA2048_PSS = "RSA2048PSS";
    field public static final java.lang.String KEY_ALGORITHM_RSA2048_PSS = "RSA2048PSS";
  }
  }
  public static abstract class TokenBindingService.TokenBindingKey {
    ctor public TokenBindingService.TokenBindingKey();
    method public abstract java.lang.String getAlgorithm();
    method public abstract java.security.KeyPair getKeyPair();
  }
  public final class URLUtil {
  public final class URLUtil {
    ctor public URLUtil();
    ctor public URLUtil();
    method public static java.lang.String composeSearchUrl(java.lang.String, java.lang.String, java.lang.String);
    method public static java.lang.String composeSearchUrl(java.lang.String, java.lang.String, java.lang.String);
+28 −4
Original line number Original line Diff line number Diff line
@@ -37,6 +37,21 @@ public abstract class TokenBindingService {
    public static final String KEY_ALGORITHM_RSA2048_PSS = "RSA2048PSS";
    public static final String KEY_ALGORITHM_RSA2048_PSS = "RSA2048PSS";
    public static final String KEY_ALGORITHM_ECDSAP256 = "ECDSAP256";
    public static final String KEY_ALGORITHM_ECDSAP256 = "ECDSAP256";


    /**
     * Provides the KeyPair information.
     */
    public static abstract class TokenBindingKey {
        /**
         * The public, private key pair.
         */
        public abstract KeyPair getKeyPair();

        /**
         * The algorithm that is used to generate the key pair.
         */
        public abstract String getAlgorithm();
    }

    /**
    /**
     * Returns the default TokenBinding service instance. At present there is
     * Returns the default TokenBinding service instance. At present there is
     * only one token binding service instance for all WebView instances,
     * only one token binding service instance for all WebView instances,
@@ -59,16 +74,25 @@ public abstract class TokenBindingService {
    /**
    /**
     * Retrieves the key pair for a given origin from the internal
     * Retrieves the key pair for a given origin from the internal
     * TokenBinding key store asynchronously.
     * TokenBinding key store asynchronously.
     * Will create a key pair if one does not exist.
     *
     * The user can provide a list of acceptable algorithms for the retrieved
     * key pair. If a key pair exists and it is in the list of algorithms, then
     * the key is returned. If it is not in the list, no key is returned.
     *
     * If no key pair exists, WebView chooses an algorithm from the list, in
     * the order given, to generate a key.
     *
     * The user can pass a null if any algorithm is acceptable.
     *
     *
     * @param origin The origin for the server.
     * @param origin The origin for the server.
     * @param algorithm The algorithm for generating the token binding key.
     * @param algorithm The list of algorithms. Can be null. An
     *        IllegalArgumentException is thrown if array is empty.
     * @param callback The callback that will be called when key is available.
     * @param callback The callback that will be called when key is available.
     *        Cannot be null.
     *        Cannot be null.
     */
     */
    public abstract void getKey(Uri origin,
    public abstract void getKey(Uri origin,
                                String algorithm,
                                String[] algorithm,
                                ValueCallback<KeyPair> callback);
                                ValueCallback<TokenBindingKey> callback);
    /**
    /**
     * Deletes specified key (for use when associated cookie is cleared).
     * Deletes specified key (for use when associated cookie is cleared).
     *
     *