diff options
author | Kenny Root <kroot@google.com> | 2012-08-10 08:28:37 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2012-08-20 12:44:40 -0700 |
commit | e29df16cb57b69995df597e8a6d95d986c1c43fc (patch) | |
tree | 7cb7fb03ffff118dab968b483bb6d52270cf4ac9 /keystore/java/android/security/AndroidKeyStoreProvider.java | |
parent | 473c712b19bad992ab4eafcd43175fdce77b913d (diff) |
Add AndroidKeyStore provider for KeyStore API
This introduces a public API for the Android keystore that is accessible
via java.security.KeyStore API. This allows programs to store
PrivateKeyEntry and TrustedCertificateEntry items visible only to
themselves.
Future work should include:
* Implement KeyStore.CallbackHandlerProtection parameter to allow the
caller to request that the keystore daemon unlock itself via the
system password input dialog.
* Implement SecretKeyEntry once that support is in keystore daemon
Change-Id: I382ffdf742d3f9f7647c5f5a429244a340b6bb0a
Diffstat (limited to 'keystore/java/android/security/AndroidKeyStoreProvider.java')
-rw-r--r-- | keystore/java/android/security/AndroidKeyStoreProvider.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/keystore/java/android/security/AndroidKeyStoreProvider.java b/keystore/java/android/security/AndroidKeyStoreProvider.java new file mode 100644 index 000000000000..df22f582a861 --- /dev/null +++ b/keystore/java/android/security/AndroidKeyStoreProvider.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.security; + +import java.security.Provider; + +/** + * A provider focused on providing JCA interfaces for the Android KeyStore. + * + * @hide + */ +public class AndroidKeyStoreProvider extends Provider { + public static final String PROVIDER_NAME = "AndroidKeyStoreProvider"; + + public AndroidKeyStoreProvider() { + super(PROVIDER_NAME, 1.0, "Android KeyStore security provider"); + + put("KeyStore." + AndroidKeyStore.NAME, AndroidKeyStore.class.getName()); + } +} |