aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-10-04 18:28:07 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-10-04 18:30:14 +0200
commit0ffa1b94ded0bb89c0f1b0f3ed48562646bde3fc (patch)
tree14ef78f2960a47892c4fa6678794d8d76c39614d /OpenKeychain/src/main/java/org/sufficientlysecure/keychain
parent7e5918efa36e3a2f8c34868d8e17c80b2ef1eac1 (diff)
downloadopen-keychain-0ffa1b94ded0bb89c0f1b0f3ed48562646bde3fc.tar.gz
open-keychain-0ffa1b94ded0bb89c0f1b0f3ed48562646bde3fc.tar.bz2
open-keychain-0ffa1b94ded0bb89c0f1b0f3ed48562646bde3fc.zip
certify: get rid of fingerprint check
Master key ids are unambiguous by database design, and only keys which are in the database are signed. There is no reason to check the fingerprint again during the certify operation.
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpCertifyOperation.java5
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java8
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java1
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyFragment.java7
4 files changed, 6 insertions, 15 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpCertifyOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpCertifyOperation.java
index 3a29faec3..2a74c8d8c 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpCertifyOperation.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpCertifyOperation.java
@@ -86,11 +86,6 @@ public class PgpCertifyOperation {
CanonicalizedPublicKeyRing publicRing =
mProviderHelper.getCanonicalizedPublicKeyRing(action.mMasterKeyId);
- if ( ! Arrays.equals(publicRing.getFingerprint(), action.mFingerprint)) {
- log.add(LogType.MSG_CRT_FP_MISMATCH, 3);
- certifyError += 1;
- continue;
- }
UncachedKeyRing certifiedKey = certificationKey.certifyUserIds(publicRing, action.mUserIds, null, null);
certifiedKeys.add(certifiedKey);
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java
index d2562d728..dd9c0d769 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/CertifyActionsParcel.java
@@ -74,17 +74,15 @@ public class CertifyActionsParcel implements Parcelable {
// TODO make this parcelable
public static class CertifyAction implements Serializable {
final public long mMasterKeyId;
- final public byte[] mFingerprint;
final public ArrayList<String> mUserIds;
- public CertifyAction(long masterKeyId, byte[] fingerprint) {
- this(masterKeyId, fingerprint, null);
+ public CertifyAction(long masterKeyId) {
+ this(masterKeyId, null);
}
- public CertifyAction(long masterKeyId, byte[] fingerprint, ArrayList<String> userIds) {
+ public CertifyAction(long masterKeyId, ArrayList<String> userIds) {
mMasterKeyId = masterKeyId;
- mFingerprint = fingerprint;
mUserIds = userIds;
}
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java
index 5613aa794..234b13ac2 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/results/OperationResult.java
@@ -523,7 +523,6 @@ public abstract class OperationResult implements Parcelable {
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),
- MSG_CRT_FP_MISMATCH (LogLevel.WARN, R.string.msg_crt_fp_mismatch),
MSG_CRT (LogLevel.START, R.string.msg_crt),
MSG_CRT_MASTER_FETCH (LogLevel.DEBUG, R.string.msg_crt_master_fetch),
MSG_CRT_SAVE (LogLevel.DEBUG, R.string.msg_crt_save),
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyFragment.java
index 685581be7..0c3eeece4 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CertifyKeyFragment.java
@@ -85,7 +85,6 @@ public class CertifyKeyFragment extends LoaderFragment
private Uri mDataUri;
private long mPubKeyId = Constants.key.none;
- private byte[] mPubFingerprint;
private long mMasterKeyId = Constants.key.none;
private UserIdsAdapter mUserIdsAdapter;
@@ -246,8 +245,8 @@ public class CertifyKeyFragment extends LoaderFragment
String mainUserId = data.getString(INDEX_USER_ID);
mInfoPrimaryUserId.setText(mainUserId);
- mPubFingerprint = data.getBlob(INDEX_FINGERPRINT);
- String fingerprint = KeyFormattingUtils.convertFingerprintToHex(mPubFingerprint);
+ byte[] fp = data.getBlob(INDEX_FINGERPRINT);
+ String fingerprint = KeyFormattingUtils.convertFingerprintToHex(fp);
mInfoFingerprint.setText(KeyFormattingUtils.colorizeFingerprint(fingerprint));
}
break;
@@ -316,7 +315,7 @@ public class CertifyKeyFragment extends LoaderFragment
// fill values for this action
CertifyActionsParcel parcel = new CertifyActionsParcel(mMasterKeyId);
- parcel.add(new CertifyAction(mPubKeyId, mPubFingerprint, userIds));
+ parcel.add(new CertifyAction(mPubKeyId, userIds));
Bundle data = new Bundle();
data.putParcelable(KeychainIntentService.CERTIFY_PARCEL, parcel);