modifySecretKey: err out on "use previous" expiry date for (sub)key creation
This commit is contained in:
@@ -218,6 +218,11 @@ public class PgpKeyOperation {
|
||||
return new EditKeyResult(EditKeyResult.RESULT_ERROR, log, null);
|
||||
}
|
||||
|
||||
if (add.mExpiry == null) {
|
||||
log.add(LogLevel.ERROR, LogType.MSG_CR_ERROR_NULL_EXPIRY, indent);
|
||||
return new EditKeyResult(EditKeyResult.RESULT_ERROR, log, null);
|
||||
}
|
||||
|
||||
if (add.mAlgorithm == PublicKeyAlgorithmTags.ELGAMAL_ENCRYPT) {
|
||||
log.add(LogLevel.ERROR, LogType.MSG_CR_ERROR_MASTER_ELGAMAL, indent);
|
||||
return new EditKeyResult(EditKeyResult.RESULT_ERROR, log, null);
|
||||
@@ -638,7 +643,8 @@ public class PgpKeyOperation {
|
||||
);
|
||||
PGPKeyPair keyPair = createKey(add.mAlgorithm, add.mKeysize, log, indent);
|
||||
subProgressPop();
|
||||
if(keyPair == null) {
|
||||
if (keyPair == null) {
|
||||
log.add(LogLevel.ERROR, LogType.MSG_MF_ERROR_PGP, indent +1);
|
||||
return new EditKeyResult(EditKeyResult.RESULT_ERROR, log, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -347,6 +347,7 @@ public class OperationResultParcel implements Parcelable {
|
||||
MSG_CR_ERROR_NO_MASTER (R.string.msg_cr_error_no_master),
|
||||
MSG_CR_ERROR_NO_USER_ID (R.string.msg_cr_error_no_user_id),
|
||||
MSG_CR_ERROR_NO_CERTIFY (R.string.msg_cr_error_no_certify),
|
||||
MSG_CR_ERROR_NULL_EXPIRY(R.string.msg_cr_error_null_expiry),
|
||||
MSG_CR_ERROR_KEYSIZE_512 (R.string.msg_cr_error_keysize_512),
|
||||
MSG_CR_ERROR_UNKNOWN_ALGO (R.string.msg_cr_error_unknown_algo),
|
||||
MSG_CR_ERROR_INTERNAL_PGP (R.string.msg_cr_error_internal_pgp),
|
||||
@@ -360,6 +361,7 @@ public class OperationResultParcel implements Parcelable {
|
||||
MSG_MF_ERROR_INTEGRITY (R.string.msg_mf_error_integrity),
|
||||
MSG_MF_ERROR_NOEXIST_PRIMARY (R.string.msg_mf_error_noexist_primary),
|
||||
MSG_MF_ERROR_NOEXIST_REVOKE (R.string.msg_mf_error_noexist_revoke),
|
||||
MSG_MF_ERROR_NULL_EXPIRY (R.string.msg_mf_error_null_expiry),
|
||||
MSG_MF_ERROR_REVOKED_PRIMARY (R.string.msg_mf_error_revoked_primary),
|
||||
MSG_MF_ERROR_PGP (R.string.msg_mf_error_pgp),
|
||||
MSG_MF_ERROR_SIG (R.string.msg_mf_error_sig),
|
||||
|
||||
@@ -627,6 +627,7 @@
|
||||
<string name="msg_cr_error_no_master">No master key options specified!</string>
|
||||
<string name="msg_cr_error_no_user_id">Keyrings must be created with at least one user id!</string>
|
||||
<string name="msg_cr_error_no_certify">Master key must have certify flag!</string>
|
||||
<string name="msg_cr_error_null_expiry">Expiry time cannot be "same as before" on key creation. This is a programming error, please file a bug report!</string>
|
||||
<string name="msg_cr_error_keysize_512">Key size must be greater or equal 512!</string>
|
||||
<string name="msg_cr_error_internal_pgp">Internal PGP error!</string>
|
||||
<string name="msg_cr_error_unknown_algo">Bad algorithm choice!</string>
|
||||
@@ -641,6 +642,7 @@
|
||||
<string name="msg_mf_error_noexist_primary">Bad primary user id specified!</string>
|
||||
<string name="msg_mf_error_noexist_revoke">Bad user id for revocation specified!</string>
|
||||
<string name="msg_mf_error_revoked_primary">Revoked user ids cannot be primary!</string>
|
||||
<string name="msg_mf_error_null_expiry">Expiry time cannot be "same as before" on subkey creation. This is a programming error, please file a bug report!</string>
|
||||
<string name="msg_mf_error_pgp">PGP internal exception!</string>
|
||||
<string name="msg_mf_error_sig">Signature exception!</string>
|
||||
<string name="msg_mf_passphrase">Changing passphrase</string>
|
||||
|
||||
Reference in New Issue
Block a user