mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-26 00:48:51 -05:00
Use master key id for keybase proof verification
This commit is contained in:
parent
47caad3edb
commit
fd60d49d26
@ -274,17 +274,11 @@ public class PgpDecryptVerify extends BaseOperation {
|
|||||||
return new DecryptVerifyResult(DecryptVerifyResult.RESULT_ERROR, log);
|
return new DecryptVerifyResult(DecryptVerifyResult.RESULT_ERROR, log);
|
||||||
}
|
}
|
||||||
|
|
||||||
CanonicalizedPublicKey encryptKey = signingKey;
|
String fingerprint = KeyFormattingUtils.convertFingerprintToHex(signingRing.getFingerprint());
|
||||||
try {
|
if (!(mRequiredSignerFingerprint.equals(fingerprint))) {
|
||||||
encryptKey = signingRing.getEncryptionSubKey();
|
|
||||||
} catch (PgpKeyNotFoundException e) {
|
|
||||||
}
|
|
||||||
String fingerprint = KeyFormattingUtils.convertFingerprintToHex(signingKey.getFingerprint());
|
|
||||||
String cryptFingerprint = KeyFormattingUtils.convertFingerprintToHex(encryptKey.getFingerprint());
|
|
||||||
if (!(mRequiredSignerFingerprint.equals(fingerprint) || mRequiredSignerFingerprint.equals(cryptFingerprint))) {
|
|
||||||
log.add(LogType.MSG_VL_ERROR_MISSING_KEY, indent);
|
log.add(LogType.MSG_VL_ERROR_MISSING_KEY, indent);
|
||||||
Log.d(Constants.TAG, "Key mismatch; wanted " + mRequiredSignerFingerprint +
|
Log.d(Constants.TAG, "Fingerprint mismatch; wanted " + mRequiredSignerFingerprint +
|
||||||
" got " + fingerprint + "/" + cryptFingerprint);
|
" got " + fingerprint + "!");
|
||||||
return new DecryptVerifyResult(DecryptVerifyResult.RESULT_ERROR, log);
|
return new DecryptVerifyResult(DecryptVerifyResult.RESULT_ERROR, log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user