6 Commits

Author SHA1 Message Date
Nick Kralevich
34c47c8558 Don't rely on the system locale for converting to/from bytes.
By default, when java converts Strings to bytes, it uses the
default system locale.  This can be specified by the -Dfile.encoding
option.  If no file encoding is specified, java uses ISO8859_1.

Unfortunately, not all unicode characters can be mapped to
ISO8859_1.  Unmappable characters may be replaced by a byte
within ISO8859_1, which may change the meaning of the String.
This is especially problematic for password strings, and has
been used to compromise the security of passwords in the
past.

Thankfully, Android uses UTF-8 by default, so this bug doesn't
effect Android devices.  However, it's recommended to explicitly
list the character set when converting to/from bytes to
avoid the potential ambiguity.

Change-Id: Iec927e27ed3fc103696c439f6bd3e8779a37ade8
2010-03-10 11:25:53 -08:00
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
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