diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java index 9a08290e4..797a3cc3e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java @@ -166,7 +166,7 @@ public class PgpKeyOperation { try { - log.add(LogLevel.ERROR, LogType.MSG_MF_ERROR_KEYID, indent); + log.add(LogLevel.START, LogType.MSG_CR, indent); indent += 1; updateProgress(R.string.progress_building_key, 0, 100); @@ -176,6 +176,11 @@ public class PgpKeyOperation { } SubkeyAdd add = saveParcel.addSubKeys.remove(0); + if ((add.mFlags & KeyFlags.CERTIFY_OTHER) != KeyFlags.CERTIFY_OTHER) { + log.add(LogLevel.ERROR, LogType.MSG_CR_ERROR_NO_CERTIFY, indent); + return null; + } + PGPKeyPair keyPair = createKey(add.mAlgorithm, add.mKeysize); if (add.mAlgorithm == Constants.choice.algorithm.elgamal) { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java index e0d11dafa..ffe640d90 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java @@ -248,7 +248,9 @@ public class OperationResultParcel implements Parcelable { MSG_MG_FOUND_NEW (R.string.msg_mg_found_new), // secret key create - MSG_CR_ERROR_NO_MASTER (R.string.msg_mr), + MSG_CR (R.string.msg_cr), + MSG_CR_ERROR_NO_MASTER (R.string.msg_cr_error_no_master), + MSG_CR_ERROR_NO_CERTIFY (R.string.msg_cr_error_no_certify), // secret key modify MSG_MF (R.string.msg_mr), @@ -260,6 +262,8 @@ public class OperationResultParcel implements Parcelable { MSG_MF_ERROR_PGP (R.string.msg_mf_error_pgp), MSG_MF_ERROR_SIG (R.string.msg_mf_error_sig), MSG_MF_PASSPHRASE (R.string.msg_mf_passphrase), + MSG_MF_PRIMARY_REPLACE_OLD (R.string.msg_mf_primary_replace_old), + MSG_MF_PRIMARY_NEW (R.string.msg_mf_primary_new), MSG_MF_SUBKEY_CHANGE (R.string.msg_mf_subkey_change), MSG_MF_SUBKEY_MISSING (R.string.msg_mf_subkey_missing), MSG_MF_SUBKEY_NEW_ID (R.string.msg_mf_subkey_new_id), diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 29780f235..601df994a 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -550,7 +550,7 @@ Re-inserting secret key Encountered bad certificate! Error processing certificate! - User id is certified by %1$s (%2$s) + User id is certified by %1$s Ignoring one certificate issued by an unknown public key Ignoring %s certificates issued by unknown public keys @@ -632,6 +632,11 @@ Adding new subkey %s Found %s new certificates in keyring + + Generating new master key + No master key options specified! + Master key must have certify flag! + Modifying keyring %s Encoding exception! @@ -642,6 +647,8 @@ PGP internal exception! Signature exception! Changing passphrase + Replacing certificate of previous primary user id + Generating new certificate for new primary user id Modifying subkey %s Tried to operate on missing subkey %s! Generating new %1$s bit %2$s subkey