Properly handle uneditable key types in EditKeyFragment

More specifically, return an OperationResultParcel for stripped and
divert-to-card keys, with an appropriate error message in the log.

part of #828
This commit is contained in:
Vincent Breitmoser
2014-09-08 14:32:55 +02:00
parent 9eed414a77
commit 055fb59ec3
4 changed files with 54 additions and 9 deletions

View File

@@ -381,6 +381,10 @@ public class PgpKeyOperation {
* This is a natural workflow since pgp keyrings are immutable data structures: Old semantics
* are changed by adding new certificates, which implicitly override older certificates.
*
* Note that this method does not care about any "special" type of master key. If unlocking
* with a passphrase fails, the operation will fail with an unlocking error. More specific
* handling of errors should be done in UI code!
*
*/
public EditKeyResult modifySecretKeyRing(CanonicalizedSecretKeyRing wsKR, SaveKeyringParcel saveParcel,
String passphrase) {