create three keys by default

This commit is contained in:
Ashley Hughes 2014-03-31 23:23:51 +01:00
parent 47b23a90d5
commit 5bc902dbb1

View File

@ -568,7 +568,7 @@ public class KeychainIntentService extends IntentService
ArrayList<Integer> keyUsageList = new ArrayList<Integer>(); ArrayList<Integer> keyUsageList = new ArrayList<Integer>();
/* Operation */ /* Operation */
int keysTotal = 2; int keysTotal = 3;
int keysCreated = 0; int keysCreated = 0;
setProgress( setProgress(
getApplicationContext().getResources(). getApplicationContext().getResources().
@ -591,6 +591,13 @@ public class KeychainIntentService extends IntentService
keysCreated++; keysCreated++;
setProgress(keysCreated, keysTotal); setProgress(keysCreated, keysTotal);
subKey = keyOperations.createKey(Id.choice.algorithm.rsa,
4096, passphrase, false);
newKeys.add(subKey);
keyUsageList.add(KeyFlags.SIGN_DATA);
keysCreated++;
setProgress(keysCreated, keysTotal);
// TODO: default to one master for cert, one sub for encrypt and one sub // TODO: default to one master for cert, one sub for encrypt and one sub
// for sign // for sign