consolidate: make it work

This commit is contained in:
Vincent Breitmoser
2014-06-18 13:43:18 +02:00
parent 1e45e5cd9a
commit f80228a08d
4 changed files with 127 additions and 106 deletions

View File

@@ -677,6 +677,19 @@ public class ProviderHelper {
secretRing = getWrappedSecretKeyRing(keyRing.getMasterKeyId()).getUncached();
log(LogLevel.DEBUG, LogType.MSG_IP_PRESERVING_SECRET);
progress.setProgress(LogType.MSG_IP_PRESERVING_SECRET.getMsgId(), 10, 100);
mIndent += 1;
// Merge data from new public ring into secret one
secretRing = secretRing.merge(keyRing, mLog, mIndent);
if (secretRing == null) {
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog);
}
// NOTE that the info from this secret keyring will implicitly be merged into the
// new public keyring, since that one is merged with the old public keyring.
mIndent -= 1;
} catch (NotFoundException e) {
secretRing = null;
}