Use master key id for keybase proof verification

This commit is contained in:
Dominik Schürmann 2014-11-22 00:10:15 +01:00
parent 47caad3edb
commit fd60d49d26

View File

@ -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);
} }