92 Commits

Author SHA1 Message Date
Oscar Montemayor
64ef1ce936 Fix for bug 2427961 android.security.tests.SystemKeyStoreTest:testBasicAccess is failing.
Fixed issues in test.
2010-02-09 15:48:03 -08:00
Chia-chi Yeh
d12feb9766 KeyStore: minor improvements.
Make constants final.
Only converts ArrayLists to arrays when necessary.
2010-02-06 10:43:22 +08:00
Oscar Montemayor
d02546b415 Apps on SD card.
Added support for retrieving and generating keys as Hex Strings.
Using keys to mount encrypted FS.
2010-01-15 15:08:06 -08:00
Oscar Montemayor
b62e8132df Apps on SD card.
Added support for retrieving and generating keys as Hex Strings.
2010-01-15 11:16:31 -08:00
Oscar Montemayor
8da98e30d8 Apps on SD card project.
A simple keystore to store system-only key material, by leveraging file system access permissions.
2010-01-06 16:23:57 -08:00
Chung-yih Wang
f35e9663d7 Add unit test for the new keystore.
Since we need to test the keystore with user system in order to test
the reset(), password(), lock() and unlock(), we have to take advantage
of the ActivityUnitTestCase to run the test with the user 'system'.
2009-09-29 15:20:24 +08:00
Chia-chi Yeh
8c596c6cce KeyStore: remove classes used by old keystore. 2009-09-24 13:32:40 +08:00
Chia-chi Yeh
f1ece5d0c1 KeyStore: return null when response code indicates an error. 2009-09-24 13:29:58 +08:00
Hung-ying Tyan
ec05c46ea9 Remove old keystore and related files. 2009-09-24 13:13:44 +08:00
Chia-chi Yeh
613fcc8506 KeyStore: rename scan() to saw(). 2009-09-22 03:04:46 +08:00
Chia-chi Yeh
4403917262 KeyStore: add java interface. 2009-09-21 15:52:00 +08:00
Chia-chi Yeh
9b7a3f1a64 Add a helper class to send out credentials.
Change-Id: I9a550c6edc55d5c2c601223c011922b183cb4d30
2009-09-18 12:03:04 +08:00
Hung-ying Tyan
5b680802b6 Fix a minor bug in is_alnum_string()...
and remove some verbose logging
2009-09-17 12:17:29 +08:00
Hung-ying Tyan
a7df557aa2 Add tests and misc fixes on keystore.
* Refactor netkeystore.c to make client and server code testable.
* Add a client test for setting new passwd and changing passwd.
* Exclude "." and ".." from reset_keystore().
* Change ServerCommand.executeCommand() to accept variable length of
  arguments and add convert() to marshalling the args to bytes.
* Keystore.java is revised accordingly.
2009-09-11 19:30:13 +08:00
Hung-ying Tyan
9249cc69b8 Add two CertTool helper classes.
Also add the unlock action string to Keystore.
2009-09-10 12:51:07 +08:00
Chia-chi Yeh
37062b93dc keystore: remove "#include <openssl/engine.h>". 2009-09-10 03:56:04 +08:00
Chung-yih Wang
801b73f661 Replace the delimiter whitespace with '\0'.
+ Use '\0' as the delimiter.
+ Allow whitespace character for keystore password.

In previous implementation, we use space as the delimiter. That
will stop user from using passphrase with whitespace character.
2009-09-09 15:00:43 +08:00
Chung-yih Wang
60c821c8ee Print error message if the buffer size is too small. 2009-09-02 11:54:24 +08:00
Chung-yih Wang
09960230bf Store CA certificate chain into one single key entry with PEM format.
Extract all CA certificates in a PKCS12 keystore into a single entry in keystore with multiple PEMs.
2009-09-01 16:45:13 +08:00
Android (Google) Code Review
d21a04c06c Merge change 21259 into eclair
* changes:
  Make certificate-handling-related constants public
2009-08-26 20:29:17 -07:00
Jean-Baptiste Queru
969c2eaa3a am c8ab08aa: Merge change 21124 into donut
Merge commit 'c8ab08aa86aea3b693f731c9e817eeb71ab4c1cd' into eclair

* commit 'c8ab08aa86aea3b693f731c9e817eeb71ab4c1cd':
  Add license-related files
2009-08-18 08:44:43 -07:00
Hung-ying Tyan
20a1156c6f Make certificate-handling-related constants public 2009-08-14 18:35:44 +08:00
Jean-Baptiste Queru
979b142fa5 Add license-related files
BUG=1573996
2009-08-13 10:58:11 -07:00
repo sync
f1ab36f9ab Fix network order for marshalling in keystore interface.
This will fix the endian issue for heterogeneous architectures in keystore marshalling interface.
2009-08-10 16:13:00 +08:00
Chung-yih Wang
dc1d5704a7 Fix the auto notification cleanup when vpn is disconnected.
+ add the log print if the browser give the incorrect data in addCertificate().
2009-08-03 15:11:36 +08:00
Hung-ying Tyan
e81f51f44b Change some log.i to log.d. 2009-08-01 10:11:46 +08:00
Chung-yih Wang
fd3db87e28 Support x509-user-cert mime type in browser.
+ Fix the public key matching and intent parameter mismatch.
2009-07-28 18:37:13 +08:00
Chung-yih Wang
1914523786 Forgot to convert the jstring to char* in certificate request. 2009-07-28 15:18:22 +08:00
Chung-yih Wang
719eba5bb1 Change to SPKAC certificate request format for keygen. 2009-07-24 11:33:45 +08:00
Chung-yih Wang
24988b3491 Cleanup the old keystore APIs. 2009-07-22 06:04:58 +08:00
Chung-yih Wang
22726cf817 Return error codes for storing the key/cert in addPkcs12Keystore() 2009-07-22 05:35:20 +08:00
Chung-yih Wang
c9c119e733 Support addPkcs12Keystore function in CertTool library.
The function will be called from the credential storage for decoding
the pkcs12 file and saving the certs/keys into mini-keystore.
2009-07-18 01:17:20 +08:00
Chung-yih Wang
699ca3f251 Add password field for WiFi configuration.
1. the certtool.h is modified for avoiding the side effect,
   for saving the configuration with wpa_supplicant.
2. put the loadLibrary back in CertTool.java
3. Fix incorrect JNI declarations.
2009-07-05 11:06:01 +08:00
Chung-yih Wang
bf20b9963a Migrate to the CertTool library.
Keystore is reimplemented and it is mainly for storing
(key, value) pair generically. The certificate related
APIs are moved to the class CertTool instead.

Updates:
  Provide the getInstance() which gives the singleton.
  Fix the missing construction of the BIO in cert.c.
2009-07-04 00:22:51 +08:00
Hung-ying Tyan
116d890aea Fix null data handling in ServiceCommand.writeCommand() 2009-07-03 17:38:59 +08:00
Chung-yih Wang
fa927c046a Remove the null-termination for Java string compatibility.
1. Also change the keyname delimiter in CertTool.java.
2. Return NOTFOUND if the result.len==0 in the listKeys().
3. Define the keystore states in the class Keystore.
2009-07-02 23:08:39 +08:00
Chung-yih Wang
eec11827a6 Add CertTool for handling the keygen and certificate download.
1. Have the new Keystore for mini-keystore impelemntation.
2. Add CertTool library and jni dll for handling keygen and certificates.
3. Make Reply hidden.
4. Revert some 'incorrect' change and correct the description.
2009-07-02 18:56:12 +08:00
Grace Kloba
3af8e9389e Change addCertificate to take byte[] instead of String as we don't know the encoding.
In WebView, if we run into the certificate, we will save it to the Keystore instead of sending it to the WebKit.
2009-06-19 15:09:34 -07:00
Chung-yih Wang
6d531bf051 Change the keystore APIs.
1. simplify the keypair selection in UI.
2. add the user certificate and key into the keystore for keygen feature.
2009-06-17 14:32:05 +08:00
Hung-ying Tyan
396c69ca8d Change the first parameter of Keystore.generateKeyPair() to int.
* changes
  change the parameter to the index to the supported key strengths
  remove the exception class as it is not useful now
2009-06-16 23:57:16 +08:00
Hung-ying Tyan
1d51e50d5d Add keygen API to Keystore. 2009-06-16 17:14:38 +08:00
Chung-yih Wang
10e371f182 Provide the Keystore feature in the framework.
-- added the keystore library for Java application.
-- changed the marshalling of the keystore function return.
2009-06-11 17:28:40 +08:00