mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-16 07:00:14 -05:00
Merge branch 'keybase-proofs' of github.com:open-keychain/open-keychain into keybase-proofs
This commit is contained in:
commit
a278382c28
@ -30,7 +30,6 @@ import com.textuality.keybase.lib.Proof;
|
|||||||
import com.textuality.keybase.lib.prover.Prover;
|
import com.textuality.keybase.lib.prover.Prover;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.openintents.openpgp.OpenPgpSignatureResult;
|
|
||||||
import org.spongycastle.openpgp.PGPUtil;
|
import org.spongycastle.openpgp.PGPUtil;
|
||||||
import org.sufficientlysecure.keychain.Constants;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
@ -324,6 +323,11 @@ public class KeychainIntentService extends IntentService implements Progressable
|
|||||||
sendProofError(prover.getLog(), getString(R.string.keybase_problem_fetching_evidence));
|
sendProofError(prover.getLog(), getString(R.string.keybase_problem_fetching_evidence));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
String requiredFingerprint = data.getString(KEYBASE_REQUIRED_FINGERPRINT);
|
||||||
|
if (!prover.checkFingerprint(requiredFingerprint)) {
|
||||||
|
sendProofError(getString(R.string.keybase_key_mismatch));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String domain = prover.dnsTxtCheckRequired();
|
String domain = prover.dnsTxtCheckRequired();
|
||||||
if (domain != null) {
|
if (domain != null) {
|
||||||
@ -361,13 +365,12 @@ public class KeychainIntentService extends IntentService implements Progressable
|
|||||||
|
|
||||||
InputData inputData = createDecryptInputData(data);
|
InputData inputData = createDecryptInputData(data);
|
||||||
OutputStream outStream = createCryptOutputStream(data);
|
OutputStream outStream = createCryptOutputStream(data);
|
||||||
String fingerprint = data.getString(KEYBASE_REQUIRED_FINGERPRINT);
|
|
||||||
|
|
||||||
PgpDecryptVerify.Builder builder = new PgpDecryptVerify.Builder(
|
PgpDecryptVerify.Builder builder = new PgpDecryptVerify.Builder(
|
||||||
this, new ProviderHelper(this), this,
|
this, new ProviderHelper(this), this,
|
||||||
inputData, outStream
|
inputData, outStream
|
||||||
);
|
);
|
||||||
builder.setSignedLiteralData(true).setRequiredSignerFingerprint(fingerprint);
|
builder.setSignedLiteralData(true).setRequiredSignerFingerprint(requiredFingerprint);
|
||||||
|
|
||||||
DecryptVerifyResult decryptVerifyResult = builder.build().execute();
|
DecryptVerifyResult decryptVerifyResult = builder.build().execute();
|
||||||
outStream.close();
|
outStream.close();
|
||||||
|
@ -562,6 +562,7 @@
|
|||||||
<string name="keybase_proof_failure">"Unfortunately this proof cannot be verified."</string>
|
<string name="keybase_proof_failure">"Unfortunately this proof cannot be verified."</string>
|
||||||
<string name="keybase_unknown_proof_failure">"Unrecognized problem with proof checker"</string>
|
<string name="keybase_unknown_proof_failure">"Unrecognized problem with proof checker"</string>
|
||||||
<string name="keybase_problem_fetching_evidence">"Problem with proof evidence"</string>
|
<string name="keybase_problem_fetching_evidence">"Problem with proof evidence"</string>
|
||||||
|
<string name="keybase_key_mismatch">"Key fingerprint doesn’t match that in proof post"</string>
|
||||||
<string name="keybase_dns_query_failure">"DNS TXT Record retrieval failed"</string>
|
<string name="keybase_dns_query_failure">"DNS TXT Record retrieval failed"</string>
|
||||||
<string name="keybase_no_prover_found">"No proof checker found for"</string>
|
<string name="keybase_no_prover_found">"No proof checker found for"</string>
|
||||||
<string name="keybase_message_payload_mismatch">"Decrypted proof post does not match expected value"</string>
|
<string name="keybase_message_payload_mismatch">"Decrypted proof post does not match expected value"</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user