[VPN] save public legacy VPN details publicly
This does not include certificates, private keys etc. which are still saved in the KeyStore with the encryption the user requested for them. Makes connecting to lockdown vpn before user unlock possible. Bug: 26108660 Change-Id: I56c1672c7a41e761c2791584b99900aff51b59e4
This commit is contained in:
@@ -64,9 +64,6 @@ public class LockdownConfigFragment extends DialogFragment {
|
||||
}
|
||||
|
||||
private static String getStringOrNull(KeyStore keyStore, String key) {
|
||||
if (!keyStore.isUnlocked()) {
|
||||
return null;
|
||||
}
|
||||
final byte[] value = keyStore.get(key);
|
||||
return value == null ? null : new String(value);
|
||||
}
|
||||
@@ -122,7 +119,7 @@ public class LockdownConfigFragment extends DialogFragment {
|
||||
return;
|
||||
}
|
||||
keyStore.put(Credentials.LOCKDOWN_VPN, profile.key.getBytes(),
|
||||
KeyStore.UID_SELF, KeyStore.FLAG_ENCRYPTED);
|
||||
KeyStore.UID_SELF, /* flags */ 0);
|
||||
}
|
||||
|
||||
// kick profiles since we changed them
|
||||
|
Reference in New Issue
Block a user