Loading src/com/android/settings/CredentialStorage.java +3 −3 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ public final class CredentialStorage extends Activity { String key = bundle.getString(Credentials.EXTRA_USER_PRIVATE_KEY_NAME); byte[] value = bundle.getByteArray(Credentials.EXTRA_USER_PRIVATE_KEY_DATA); if (!mKeyStore.importKey(key, value, uid)) { if (!mKeyStore.importKey(key, value, uid, KeyStore.FLAG_ENCRYPTED)) { Log.e(TAG, "Failed to install " + key + " as user " + uid); return; } Loading @@ -206,7 +206,7 @@ public final class CredentialStorage extends Activity { String certName = bundle.getString(Credentials.EXTRA_USER_CERTIFICATE_NAME); byte[] certData = bundle.getByteArray(Credentials.EXTRA_USER_CERTIFICATE_DATA); if (!mKeyStore.put(certName, certData, uid)) { if (!mKeyStore.put(certName, certData, uid, KeyStore.FLAG_ENCRYPTED)) { Log.e(TAG, "Failed to install " + certName + " as user " + uid); return; } Loading @@ -216,7 +216,7 @@ public final class CredentialStorage extends Activity { String caListName = bundle.getString(Credentials.EXTRA_CA_CERTIFICATES_NAME); byte[] caListData = bundle.getByteArray(Credentials.EXTRA_CA_CERTIFICATES_DATA); if (!mKeyStore.put(caListName, caListData, uid)) { if (!mKeyStore.put(caListName, caListData, uid, KeyStore.FLAG_ENCRYPTED)) { Log.e(TAG, "Failed to install " + caListName + " as user " + uid); return; } Loading src/com/android/settings/vpn2/VpnSettings.java +4 −2 Original line number Diff line number Diff line Loading @@ -237,7 +237,8 @@ public class VpnSettings extends SettingsPreferenceFragment implements if (button == DialogInterface.BUTTON_POSITIVE) { // Always save the profile. VpnProfile profile = mDialog.getProfile(); mKeyStore.put(Credentials.VPN + profile.key, profile.encode()); mKeyStore.put(Credentials.VPN + profile.key, profile.encode(), KeyStore.UID_SELF, KeyStore.FLAG_ENCRYPTED); // Update the preference. VpnPreference preference = mPreferences.get(profile.key); Loading Loading @@ -530,7 +531,8 @@ public class VpnSettings extends SettingsPreferenceFragment implements Toast.LENGTH_LONG).show(); return; } keyStore.put(Credentials.LOCKDOWN_VPN, profile.key.getBytes()); keyStore.put(Credentials.LOCKDOWN_VPN, profile.key.getBytes(), KeyStore.UID_SELF, KeyStore.FLAG_ENCRYPTED); } // kick profiles since we changed them Loading Loading
src/com/android/settings/CredentialStorage.java +3 −3 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ public final class CredentialStorage extends Activity { String key = bundle.getString(Credentials.EXTRA_USER_PRIVATE_KEY_NAME); byte[] value = bundle.getByteArray(Credentials.EXTRA_USER_PRIVATE_KEY_DATA); if (!mKeyStore.importKey(key, value, uid)) { if (!mKeyStore.importKey(key, value, uid, KeyStore.FLAG_ENCRYPTED)) { Log.e(TAG, "Failed to install " + key + " as user " + uid); return; } Loading @@ -206,7 +206,7 @@ public final class CredentialStorage extends Activity { String certName = bundle.getString(Credentials.EXTRA_USER_CERTIFICATE_NAME); byte[] certData = bundle.getByteArray(Credentials.EXTRA_USER_CERTIFICATE_DATA); if (!mKeyStore.put(certName, certData, uid)) { if (!mKeyStore.put(certName, certData, uid, KeyStore.FLAG_ENCRYPTED)) { Log.e(TAG, "Failed to install " + certName + " as user " + uid); return; } Loading @@ -216,7 +216,7 @@ public final class CredentialStorage extends Activity { String caListName = bundle.getString(Credentials.EXTRA_CA_CERTIFICATES_NAME); byte[] caListData = bundle.getByteArray(Credentials.EXTRA_CA_CERTIFICATES_DATA); if (!mKeyStore.put(caListName, caListData, uid)) { if (!mKeyStore.put(caListName, caListData, uid, KeyStore.FLAG_ENCRYPTED)) { Log.e(TAG, "Failed to install " + caListName + " as user " + uid); return; } Loading
src/com/android/settings/vpn2/VpnSettings.java +4 −2 Original line number Diff line number Diff line Loading @@ -237,7 +237,8 @@ public class VpnSettings extends SettingsPreferenceFragment implements if (button == DialogInterface.BUTTON_POSITIVE) { // Always save the profile. VpnProfile profile = mDialog.getProfile(); mKeyStore.put(Credentials.VPN + profile.key, profile.encode()); mKeyStore.put(Credentials.VPN + profile.key, profile.encode(), KeyStore.UID_SELF, KeyStore.FLAG_ENCRYPTED); // Update the preference. VpnPreference preference = mPreferences.get(profile.key); Loading Loading @@ -530,7 +531,8 @@ public class VpnSettings extends SettingsPreferenceFragment implements Toast.LENGTH_LONG).show(); return; } keyStore.put(Credentials.LOCKDOWN_VPN, profile.key.getBytes()); keyStore.put(Credentials.LOCKDOWN_VPN, profile.key.getBytes(), KeyStore.UID_SELF, KeyStore.FLAG_ENCRYPTED); } // kick profiles since we changed them Loading