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

Commit beafcb50 authored by Robert Berry's avatar Robert Berry
Browse files

Fix minor documentation issues in RecoveryController

Test: none, just doc updates
Change-Id: I7d2152f788a65162d72dbd9970230a9a07034014
parent 0ec75bea
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -17,10 +17,8 @@
package android.security.keystore.recovery;

/**
 * Error thrown when the recovery agent supplies an invalid X509 certificate.
 *
 * @deprecated Not used.
 * @hide
 * Deprecated
 */
public class BadCertificateFormatException extends RecoveryControllerException {
    public BadCertificateFormatException(String msg) {
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.security.keystore.recovery;
import android.annotation.SystemApi;

import java.security.GeneralSecurityException;

/**
 * An error thrown when something went wrong internally in the recovery service.
 *
+3 −3
Original line number Diff line number Diff line
@@ -49,8 +49,8 @@ import java.util.Map;
 * After that number of incorrect guesses, the trusted hardware no longer allows access to the
 * key chain.
 *
 * <p>For now only the recovery agent itself is able to create keys, so it is expected that the
 * recovery agent is itself the system app.
 * <p>Only the recovery agent itself is able to create keys, so it is expected that the recovery
 * agent is itself the system app.
 *
 * <p>A recovery agent requires the privileged permission
 * {@code android.Manifest.permission#RECOVER_KEYSTORE}.
+1 −3
Original line number Diff line number Diff line
@@ -19,10 +19,8 @@ package android.security.keystore.recovery;
import java.security.GeneralSecurityException;

/**
 * Base exception for errors thrown by {@link RecoveryController}.
 *
 * @deprecated Not used.
 * @hide
 * Deprecated
 */
public abstract class RecoveryControllerException extends GeneralSecurityException {
    RecoveryControllerException() { }
+2 −22
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public class RecoverySession implements AutoCloseable {
    }

    /**
     * A new session, started by {@code recoveryManager}.
     * A new session, started by the {@link RecoveryController}.
     */
    @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
    static RecoverySession newInstance(RecoveryController recoveryController) {
@@ -72,26 +72,6 @@ public class RecoverySession implements AutoCloseable {
    }

    /**
     * Starts a recovery session and returns a blob with proof of recovery secret possession.
     * The method generates a symmetric key for a session, which trusted remote device can use to
     * return recovery key.
     *
     * @param verifierPublicKey Encoded {@code java.security.cert.X509Certificate} with Public key
     *     used to create the recovery blob on the source device.
     *     Keystore will verify the certificate using root of trust.
     * @param vaultParams Must match the parameters in the corresponding field in the recovery blob.
     *     Used to limit number of guesses.
     * @param vaultChallenge Data passed from server for this recovery session and used to prevent
     *     replay attacks
     * @param secrets Secrets provided by user, the method only uses type and secret fields.
     * @return The recovery claim. Claim provides a b binary blob with recovery claim. It is
     *     encrypted with verifierPublicKey and contains a proof of user secrets, session symmetric
     *     key and parameters necessary to identify the counter with the number of failed recovery
     *     attempts.
     * @throws CertificateException if the {@code verifierPublicKey} is in an incorrect
     *     format.
     * @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery
     *     service.
     * @deprecated Use {@link #start(CertPath, byte[], byte[], List)} instead.
     * @removed
     */
@@ -132,7 +112,7 @@ public class RecoverySession implements AutoCloseable {
     * @param vaultParams Must match the parameters in the corresponding field in the recovery blob.
     *     Used to limit number of guesses.
     * @param vaultChallenge Data passed from server for this recovery session and used to prevent
     *     replay attacks
     *     replay attacks.
     * @param secrets Secrets provided by user, the method only uses type and secret fields.
     * @return The recovery claim. Claim provides a b binary blob with recovery claim. It is
     *     encrypted with verifierPublicKey and contains a proof of user secrets, session symmetric