Process safe implementation of PassphraseCacheService, First test for crypto provider

This commit is contained in:
Dominik Schürmann
2013-05-28 22:48:42 +02:00
parent b221c0c905
commit 215864a33e
6 changed files with 292 additions and 389 deletions

View File

@@ -56,7 +56,6 @@ import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
/**
* This Service contains all important long lasting operations for APG. It receives Intents with
* data from the activities or other apps, queues these intents, executes them, and stops itself
@@ -541,11 +540,12 @@ public class KeychainIntentService extends IntentService implements ProgressDial
/* Operation */
if (!canSign) {
PgpMain.changeSecretKeyPassphrase(this, ProviderHelper.getPGPSecretKeyRingByKeyId(this, masterKeyId),
oldPassPhrase, newPassPhrase, this);
PgpMain.changeSecretKeyPassphrase(this,
ProviderHelper.getPGPSecretKeyRingByKeyId(this, masterKeyId),
oldPassPhrase, newPassPhrase, this);
} else {
PgpMain.buildSecretKey(this, userIds, keys, keysUsages, masterKeyId, oldPassPhrase,
newPassPhrase, this);
PgpMain.buildSecretKey(this, userIds, keys, keysUsages, masterKeyId,
oldPassPhrase, newPassPhrase, this);
}
PassphraseCacheService.addCachedPassphrase(this, masterKeyId, newPassPhrase);