make certify routines more robust (#1016)

This commit is contained in:
Vincent Breitmoser
2015-01-03 22:14:12 +01:00
parent 2192a6badd
commit 47ace7cea3
4 changed files with 14 additions and 0 deletions

View File

@@ -94,6 +94,12 @@ public class CertifyOperation extends BaseOperation {
try {
if (action.mMasterKeyId == parcel.mMasterKeyId) {
log.add(LogType.MSG_CRT_ERROR_SELF, 2);
certifyError += 1;
continue;
}
if (action.mUserIds == null) {
log.add(LogType.MSG_CRT_CERTIFY_ALL, 2,
KeyFormattingUtils.convertKeyIdToHex(action.mMasterKeyId));

View File

@@ -587,6 +587,7 @@ public abstract class OperationResult implements Parcelable {
MSG_CRT_CERTIFYING (LogLevel.DEBUG, R.string.msg_crt_certifying),
MSG_CRT_CERTIFY_ALL (LogLevel.DEBUG, R.string.msg_crt_certify_all),
MSG_CRT_CERTIFY_SOME (LogLevel.DEBUG, R.plurals.msg_crt_certify_some),
MSG_CRT_ERROR_SELF (LogLevel.ERROR, R.string.msg_crt_error_self),
MSG_CRT_ERROR_MASTER_NOT_FOUND (LogLevel.ERROR, R.string.msg_crt_error_master_not_found),
MSG_CRT_ERROR_NOTHING (LogLevel.ERROR, R.string.msg_crt_error_nothing),
MSG_CRT_ERROR_UNLOCK (LogLevel.ERROR, R.string.msg_crt_error_unlock),