OSDN Git Service

Fix minor documentation issues in RecoveryController
authorRobert Berry <robertberry@google.com>
Mon, 26 Feb 2018 19:00:29 +0000 (19:00 +0000)
committerRobert Berry <robertberry@google.com>
Mon, 26 Feb 2018 19:01:38 +0000 (19:01 +0000)
Test: none, just doc updates
Change-Id: I7d2152f788a65162d72dbd9970230a9a07034014

core/java/android/security/keystore/recovery/BadCertificateFormatException.java
core/java/android/security/keystore/recovery/InternalRecoveryServiceException.java
core/java/android/security/keystore/recovery/RecoveryController.java
core/java/android/security/keystore/recovery/RecoveryControllerException.java
core/java/android/security/keystore/recovery/RecoverySession.java

index e0781a5..4275c29 100644 (file)
 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) {
index 218d26e..e62bfb1 100644 (file)
@@ -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.
  *
index 0d262c9..0683e02 100644 (file)
@@ -46,11 +46,11 @@ import java.util.Map;
  * <p>The RecoveryController must be paired with a recovery agent. The recovery agent is responsible
  * for transporting the keychain to remote trusted hardware. This hardware must prevent brute force
  * attempts against the user's lock screen by limiting the number of allowed guesses (to, e.g., 10).
- * After  that number of incorrect guesses, the trusted hardware no longer allows access to the
+ * 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}.
index 2733aca..1af61ce 100644 (file)
@@ -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() { }
index 069af91..e42c766 100644 (file)
@@ -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