diff options
author | Alex Klyubin <klyubin@google.com> | 2015-04-02 14:58:27 -0700 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2015-04-02 14:58:27 -0700 |
commit | 7f5b87692b49a3ae674eda76d5fd77ab49b97409 (patch) | |
tree | fa325c76dfd271749bd784f96e5b4db349907d1d /keystore/java/android/security/KeyStoreParameter.java | |
parent | f4f0671618c583f70ea64097062bd2c0b14ee704 (diff) | |
parent | e7e705d49401ec86147a889f7dee2b342147d19b (diff) | |
download | frameworks_base-7f5b87692b49a3ae674eda76d5fd77ab49b97409.zip frameworks_base-7f5b87692b49a3ae674eda76d5fd77ab49b97409.tar.gz frameworks_base-7f5b87692b49a3ae674eda76d5fd77ab49b97409.tar.bz2 |
resolved conflicts for merge of e7e705d4 to master
Change-Id: If3e8c985f4f122f9fb36aab206787aac1407a74e
Diffstat (limited to 'keystore/java/android/security/KeyStoreParameter.java')
-rw-r--r-- | keystore/java/android/security/KeyStoreParameter.java | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/keystore/java/android/security/KeyStoreParameter.java b/keystore/java/android/security/KeyStoreParameter.java index b1b638f..88bd6b4 100644 --- a/keystore/java/android/security/KeyStoreParameter.java +++ b/keystore/java/android/security/KeyStoreParameter.java @@ -61,8 +61,10 @@ public final class KeyStoreParameter implements ProtectionParameter { private final Integer mUserAuthenticationValidityDurationSeconds; private final boolean mInvalidatedOnNewFingerprintEnrolled; - private KeyStoreParameter(int flags, Date keyValidityStart, - Date keyValidityForOriginationEnd, Date keyValidityForConsumptionEnd, + private KeyStoreParameter(int flags, + Date keyValidityStart, + Date keyValidityForOriginationEnd, + Date keyValidityForConsumptionEnd, @KeyStoreKeyConstraints.PurposeEnum Integer purposes, @KeyStoreKeyConstraints.AlgorithmEnum Integer algorithm, @KeyStoreKeyConstraints.PaddingEnum Integer padding, @@ -177,8 +179,8 @@ public final class KeyStoreParameter implements ProtectionParameter { } /** - * Gets the digest to which the key is restricted when generating Message Authentication Codes - * (MACs). + * Gets the digest to which the key is restricted when generating signatures or Message + * Authentication Codes (MACs). * * @return digest or {@code null} if the digest is not restricted. * @@ -421,12 +423,13 @@ public final class KeyStoreParameter implements ProtectionParameter { } /** - * Restricts the key to being used only with the provided digest when generating Message - * Authentication Codes (MACs). Attempts to use the key with any other digest will be - * rejected. + * Restricts the key to being used only with the provided digest when generating signatures + * or Message Authentication Codes (MACs). Attempts to use the key with any other digest + * will be rejected. * * <p>For MAC keys, the default is to restrict to the digest specified in the key algorithm - * name. + * name. For asymmetric signing keys this constraint must be specified because there is no + * default. * * @see java.security.Key#getAlgorithm() * @@ -535,10 +538,18 @@ public final class KeyStoreParameter implements ProtectionParameter { * @return built instance of {@code KeyStoreParameter} */ public KeyStoreParameter build() { - return new KeyStoreParameter(mFlags, mKeyValidityStart, - mKeyValidityForOriginationEnd, mKeyValidityForConsumptionEnd, mPurposes, - mAlgorithm, mPadding, mDigest, mBlockMode, mMinSecondsBetweenOperations, - mMaxUsesPerBoot, mUserAuthenticators, + return new KeyStoreParameter(mFlags, + mKeyValidityStart, + mKeyValidityForOriginationEnd, + mKeyValidityForConsumptionEnd, + mPurposes, + mAlgorithm, + mPadding, + mDigest, + mBlockMode, + mMinSecondsBetweenOperations, + mMaxUsesPerBoot, + mUserAuthenticators, mUserAuthenticationValidityDurationSeconds, mInvalidatedOnNewFingerprintEnrolled); } |