15 Commits

Author SHA1 Message Date
Bernhard Bauer
26408ccd8e Add DevicePolicyManager PrivateKey mgmt
Additional device policy API to install keypairs to the keychain
silently.

Bug: 15065444
Change-Id: Idc25774c9ab1a61080290bebd6f5c4f24e6ee2e0
2014-09-11 19:17:00 +01:00
Zoltan Szatmary-Ban
f0ae135049 Extend IKeyChainService AIDL with CACert retrieval
Bug:16029580
Change-Id: I41a3bd2f3bd95550e59f1d0d0acd0e765d7b62d7
2014-09-08 17:59:42 +01:00
Zoltan Szatmary-Ban
3291de8f6c Revert "Revert "Revert "Revert "Revert "Update Trusted Credentials screen in settings"""""
This reverts commit c9249c69813c6fb889d71d84583c67ae2942e6de.

Change-Id: I5504fddaf7b18efb73cd6c76678b3b39ce9b0229
2014-08-15 14:01:14 +00:00
Zoltan Szatmary-Ban
f8d72cc14f Revert "Revert "Revert "Revert "Update Trusted Credentials screen in settings""""
This reverts commit 87efe74e092236c372d3b6909009641123aa416a.

This should be fine now with all the dependency CLs +2-ed


Change-Id: I96ad14ad5ff81e6b5391035cb6c5a62339c6cc40
2014-08-15 12:58:37 +00:00
Narayan Kamath
f75aadc028 Revert "Revert "Revert "Update Trusted Credentials screen in settings"""
This reverts commit 19c8ce291e89a9ef1442a20e1feab421b11536d7.

Change-Id: Ie5a5571127311e0a29f314c0566e779cfe940b53
2014-08-15 12:25:52 +00:00
Zoltan Szatmary-Ban
1e7bc0def8 Revert "Revert "Update Trusted Credentials screen in settings""
This reverts commit 0f0de0bdd021bad5f85fdb0399a4ea91a1611e25.

Change-Id: Ia3d0907e3d7c2ec42d64e45f60e3dfaffb932c3d
2014-08-15 12:55:35 +01:00
Zoltan Szatmary-Ban
678e3ecc93 Revert "Update Trusted Credentials screen in settings"
This reverts commit 4fde5aa9fab931d9becfc49f7d7b8526ad5640d9.

Change-Id: I581c38d64e9829b0079bafa42615f2aa0bf64763
2014-08-07 13:41:08 +00:00
Zoltan Szatmary-Ban
1386627335 Update Trusted Credentials screen in settings
Trusted credentials for both the primary user and its managed profiles are shown
on the Trusted Credentials fragment. All functionalities (e.g. disabling/enabling
of certificates) remain available.

Bug: 16029580

Change-Id: Ia92ae02d8c572bf4a3be172f6c255726cefc0fa1
2014-07-29 16:43:37 +01:00
Kenny Root
5423e68d5d Add signing to keystore
Change the keystore to keep the private keys in keystore. When returned,
it uses the OpenSSL representation of the key to allow users to use it
in various operations through the OpenSSL ENGINE that connects to
keystore.

Change-Id: I3681f98cb2ec49ffc4a49f3821909313b4ab5735
2012-03-20 09:04:33 -07:00
Fred Quintana
ab8b84ad38 Make the KeyChain handled its own grants rather than having
AccountManagerService handle them.

Change-Id: I89d272b22766f85019c1f947153d69e6dbb74c68
2011-07-13 22:45:07 -07:00
Brian Carlstrom
6da0033447 Moving ssl_certificate layout, resources, and helper code to SslCertificate
Add IKeyChainService.deleteCaCertificate

Change-Id: If42341bc732efcfe4f958c00cdd6c0fec11a3c75
2011-06-27 12:14:25 -07:00
Brian Carlstrom
ba1a667b1d Remove need for onActivityResult from KeyChain API
Change-Id: I97bb9db06978f6dc039d22bfee116671d7b3e336
2011-05-25 10:27:46 -07:00
Brian Carlstrom
8e9929c4d0 Simplify KeyChain API by removing now unneeded CA certificate lookup (1 of 3)
frameworks/base

   Remove getCaCertificates and findIssuer from IKeyChainService,
   these are now done via libcore's TrustedCertificateStore (as part
   of the default TrustManager implementation)

	keystore/java/android/security/IKeyChainService.aidl

   Simplify KeyChain API. Now that the CA certificates are visible
   through the default TrustManager, the KeyChain is solely focused on
   retrieving PrivateKeys and their associated certificates. The
   calling API for KeyChain to simply a single KeyChain.get() call
   that returns a KeyChainResult, removing the need for a KeyChain
   instance that needs to be closed.

	keystore/java/android/security/KeyChain.java
	keystore/java/android/security/KeyChainResult.java

master/libcore

    Remove getDefaultIndexedPKIXParameters and
    getIndexedPKIXParameters which was used as part of the prototype
    of looking up CAs via the KeyChain but is obsoleted by the new
    default TrustManager implementation.

	luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParametersImpl.java
	luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

packages/apps/KeyChain

    Tracking simplified IKeyChainService, removing now unneeded
    implementation, updating tests.

	src/com/android/keychain/KeyChainService.java
	tests/src/com/android/keychain/tests/KeyChainServiceTest.java
	tests/src/com/android/keychain/tests/KeyChainTestActivity.java

Change-Id: I847b28c2f467c85f24d2b693a2fecc1cb46426b4
2011-05-17 11:33:37 -07:00
Brian Carlstrom
2627d53f65 Make CertInstaller installed CA certs trusted by applications via default TrustManager (1 of 6)
frameworks/base

    Adding IKeyChainService APIs for CertInstaller and Settings use
	keystore/java/android/security/IKeyChainService.aidl

libcore

    Improve exceptions to include more information
	luni/src/main/java/javax/security/auth/x500/X500Principal.java

    Move guts of RootKeyStoreSpi to TrustedCertificateStore, leaving only KeyStoreSpi methods.
    Added support for adding user CAs in a separate directroy for system.
    Added support for removeing system CAs by placing a copy in a sytem directory
	luni/src/main/java/org/apache/harmony/xnet/provider/jsse/RootKeyStoreSpi.java
	luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStore.java

    Formerly static methods on RootKeyStoreSpi are now instance methods on TrustedCertificateStore
	luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerImpl.java

    Added test for NativeCrypto.X509_NAME_hash_old and X509_NAME_hash
    to make sure the implementing algortims doe not change since
    TrustedCertificateStore depend on X509_NAME_hash_old (OpenSSL
    changed the algorithm from MD5 to SHA1 when moving from 0.9.8 to
    1.0.0)

	luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

    Extensive test of new TrustedCertificateStore behavior
	luni/src/test/java/org/apache/harmony/xnet/provider/jsse/TrustedCertificateStoreTest.java

    TestKeyStore improvements
    - Refactored TestKeyStore to provide simpler createCA method (and
      internal createCertificate)
    - Cleaned up to remove use of BouncyCastle specific X509Principal
      in the TestKeyStore API when the public X500Principal would do.
    - Cleaned up TestKeyStore support methods to not throw Exception
      to remove need for static blocks for catch clauses in tests.

	support/src/test/java/libcore/java/security/TestKeyStore.java
	luni/src/test/java/libcore/java/security/KeyStoreTest.java
	luni/src/test/java/org/apache/harmony/xnet/provider/jsse/NativeCryptoTest.java

packages/apps/CertInstaller

    Change CertInstaller to call IKeyChainService.installCertificate
    for CA certs to pass them to the KeyChainServiceTest which will
    make them available to all apps through the
    TrustedCertificateStore. Change PKCS12 extraction to use AsyncTask.

	src/com/android/certinstaller/CertInstaller.java

    Added installCaCertsToKeyChain and hasCaCerts accessor for use by
    CertInstaller. Use hasUserCertificate() internally. Cleanup coding
    style.

	src/com/android/certinstaller/CredentialHelper.java

packages/apps/KeyChain

    Added MANAGE_ACCOUNTS so that IKeyChainService.reset
    implementation can remove KeyChain accounts.

	AndroidManifest.xml

    Implement new IKeyChainService methods:
    - Added IKeyChainService.installCaCertificate to install certs
      provided by CertInstaller using the TrustedCertificateStore.
    - Added IKeyChainService.reset to allow Settings to remove the
      KeyChain accounts so that any app granted access to keystore
      credentials are revoked when the keystore is reset.

	src/com/android/keychain/KeyChainService.java

packages/apps/Settings

    Changed com.android.credentials.RESET credential reset action to
    also call IKeyChainService.reset to remove any installed user CAs
    and remove KeyChain accounts to have AccountManager revoke
    credential granted to private keys removed during the RESET.

	src/com/android/settings/CredentialStorage.java

    Added toast text value for failure case

	res/values/strings.xml

system/core

    Have init create world readable /data/misc/keychain to allow apps
    to access user added CA certificates installed by the CertInstaller.

	rootdir/init.rc

Change-Id: I2e4b169cbb35d32d97f5d6a00d988fa389eadcb2
2011-05-14 23:45:16 -07:00
Brian Carlstrom
b9a07c18e6 Adding KeyChain API and IKeyChainService
Change-Id: Id3eaa2d1315481f199777b50e875811e3532988a
2011-04-20 13:35:31 -07:00